File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff 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 `) .
You can’t perform that action at this time.
0 commit comments