I'm getting "Serialization of Closure is not allowed" in concrete5 which uses Stash. This happens because objects stored in or returned by Empheral are a reference and any changes to the original/returned item also alters the stored instance in cache.
Therefore requesting the same cached item twice might result in different returned values even though the key has not been altered through a regular Stash set function.
This might be intended behaviour, although I don't feel it is really intuitive. It was suggested in the issue (concretecms/concretecms#6113) that this could be something that can be changed in Stash as well.
footnote: concrete5 clones objects before caching in Stash, but retrieves the cached instance without cloning. So the problem is less apparent there.
I'm getting "Serialization of Closure is not allowed" in concrete5 which uses Stash. This happens because objects stored in or returned by Empheral are a reference and any changes to the original/returned item also alters the stored instance in cache.
Therefore requesting the same cached item twice might result in different returned values even though the key has not been altered through a regular Stash
setfunction.This might be intended behaviour, although I don't feel it is really intuitive. It was suggested in the issue (concretecms/concretecms#6113) that this could be something that can be changed in Stash as well.
footnote: concrete5 clones objects before caching in Stash, but retrieves the cached instance without cloning. So the problem is less apparent there.