We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3408cdb commit 5866c77Copy full SHA for 5866c77
src/phpFastCache/Cache/ItemBaseTrait.php
@@ -382,7 +382,10 @@ public function getRemovedTags()
382
*/
383
final public function __sleep()
384
{
385
- throw new \RuntimeException('phpFastCache Item entities cannot be serialized. Use CacheItemPoolInterface::saved() instead.');
+ $info = get_object_vars($this);
386
+ $info[ 'driver' ] = 'object(' . get_class($info[ 'driver' ]) . ')';
387
+
388
+ return (array) $info;
389
}
390
391
/**
0 commit comments