Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ef3ab27

Browse filesBrowse files
nykopolxabbuh
authored andcommitted
more precision on class name, and lazy service
1 parent f97db93 commit ef3ab27
Copy full SHA for ef3ab27

File tree

Expand file treeCollapse file tree

1 file changed

+11
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+11
-6
lines changed

‎email/spool.rst

Copy file name to clipboardExpand all lines: email/spool.rst
+11-6Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,18 @@ at a regular interval.
144144

145145
.. caution::
146146

147-
When you use the filesystem for spooling, messages are serialized with
148-
the message class name. If the service is lazy loaded this class name
149-
change on every cache clear. So if you send a mail, then you clear the
150-
cache, the message will not be unserialisable.
147+
When you create a message with swiftmailer, it generate a Swift_Message
148+
class. If the swiftmailer service is lazy loaded, it generate instead a
149+
proxy class named Swift_Message_<someRandomCharacters>.
150+
151+
If you use the memory spool, this change is transparent and has no impart.
152+
But when you use the filesystem spool, the message class is serialized on
153+
a file with the randomized class name. The problem is that this random
154+
class name change on every cache clear. So if you send a mail, then you
155+
clear the cache, the message will not be unserializable.
151156

152157
On the next ``swiftmailer:spool:send`` an error will raise because the
153158
class ``Swift_Message_<someRandomCharacters>`` doesn't exist (anymore).
154159

155-
The solutions are either to use the memory spool or to load the
156-
swiftmailer without ``lazy`` option.
160+
The solutions are either to use the memory spool or to load the
161+
swiftmailer service without ``lazy`` option (see :doc:`/service_container/lazy_services`).

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.