Loading src/Object/Register.php +1 −1 Changes for src/Object/Register.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ class Register extends SlotBase implements RegisterInterface { /** * {@inheritDoc} */ protected function setCache($data, $expire = CacheBackendInterface::CACHE_PERMANENT, $tags = []): void { public function setCache($data, $expire = CacheBackendInterface::CACHE_PERMANENT, $tags = []): void { $this->doSetCache($data, $expire, $tags); } Loading src/Object/SlotBase.php +2 −21 Changes for src/Object/SlotBase.php: 2 added lines, 21 removed lines. Original line number Diff line number Diff line Loading @@ -122,28 +122,9 @@ abstract class SlotBase implements SlotBaseInterface { } /** * Sets the slot's cache entry. * * @param mixed $data * The data to be saved to the given cache slot. * @param int $expire * One of the following values: * - CacheBackendInterface::CACHE_PERMANENT: Indicates that the item should * not be removed unless it is deleted explicitly. * - A Unix timestamp: Indicates that the item will be considered invalid * after this time, i.e. it will not be returned by get() unless * $allow_invalid has been set to TRUE. When the item has expired, it may * be permanently deleted by the garbage collector at any time. * @param array $tags * An array of tags to be stored with the cache item. These should normally * identify objects used to build the cache item, which should trigger * cache invalidation when updated. For example if a cached item represents * a node, both the node ID and the author's user ID might be passed in as * tags. For example ['node:123', 'node:456', 'user:789']. * * @see CacheBackendInterface * {@inheritDoc} */ abstract protected function setCache($data, int $expire = CacheBackendInterface::CACHE_PERMANENT, array $tags = []): void; abstract public function setCache($data, int $expire = CacheBackendInterface::CACHE_PERMANENT, array $tags = []): void; /** * Common inner method for abstracted setCache. Loading src/Object/SlotBaseInterface.php +24 −0 Changes for src/Object/SlotBaseInterface.php: 24 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -76,4 +76,28 @@ interface SlotBaseInterface { */ public function addCacheTags($tags): void; /** * Sets the slot's cache entry. * * @param mixed $data * The data to be saved to the given cache slot. * @param int $expire * One of the following values: * - CacheBackendInterface::CACHE_PERMANENT: Indicates that the item should * not be removed unless it is deleted explicitly. * - A Unix timestamp: Indicates that the item will be considered invalid * after this time, i.e. it will not be returned by get() unless * $allow_invalid has been set to TRUE. When the item has expired, it may * be permanently deleted by the garbage collector at any time. * @param array $tags * An array of tags to be stored with the cache item. These should normally * identify objects used to build the cache item, which should trigger * cache invalidation when updated. For example if a cached item represents * a node, both the node ID and the author's user ID might be passed in as * tags. For example ['node:123', 'node:456', 'user:789']. * * @see CacheBackendInterface */ public function setCache($data, int $expire = CacheBackendInterface::CACHE_PERMANENT, array $tags = []): void; } Loading
src/Object/Register.php +1 −1 Changes for src/Object/Register.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ class Register extends SlotBase implements RegisterInterface { /** * {@inheritDoc} */ protected function setCache($data, $expire = CacheBackendInterface::CACHE_PERMANENT, $tags = []): void { public function setCache($data, $expire = CacheBackendInterface::CACHE_PERMANENT, $tags = []): void { $this->doSetCache($data, $expire, $tags); } Loading
src/Object/SlotBase.php +2 −21 Changes for src/Object/SlotBase.php: 2 added lines, 21 removed lines. Original line number Diff line number Diff line Loading @@ -122,28 +122,9 @@ abstract class SlotBase implements SlotBaseInterface { } /** * Sets the slot's cache entry. * * @param mixed $data * The data to be saved to the given cache slot. * @param int $expire * One of the following values: * - CacheBackendInterface::CACHE_PERMANENT: Indicates that the item should * not be removed unless it is deleted explicitly. * - A Unix timestamp: Indicates that the item will be considered invalid * after this time, i.e. it will not be returned by get() unless * $allow_invalid has been set to TRUE. When the item has expired, it may * be permanently deleted by the garbage collector at any time. * @param array $tags * An array of tags to be stored with the cache item. These should normally * identify objects used to build the cache item, which should trigger * cache invalidation when updated. For example if a cached item represents * a node, both the node ID and the author's user ID might be passed in as * tags. For example ['node:123', 'node:456', 'user:789']. * * @see CacheBackendInterface * {@inheritDoc} */ abstract protected function setCache($data, int $expire = CacheBackendInterface::CACHE_PERMANENT, array $tags = []): void; abstract public function setCache($data, int $expire = CacheBackendInterface::CACHE_PERMANENT, array $tags = []): void; /** * Common inner method for abstracted setCache. Loading
src/Object/SlotBaseInterface.php +24 −0 Changes for src/Object/SlotBaseInterface.php: 24 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -76,4 +76,28 @@ interface SlotBaseInterface { */ public function addCacheTags($tags): void; /** * Sets the slot's cache entry. * * @param mixed $data * The data to be saved to the given cache slot. * @param int $expire * One of the following values: * - CacheBackendInterface::CACHE_PERMANENT: Indicates that the item should * not be removed unless it is deleted explicitly. * - A Unix timestamp: Indicates that the item will be considered invalid * after this time, i.e. it will not be returned by get() unless * $allow_invalid has been set to TRUE. When the item has expired, it may * be permanently deleted by the garbage collector at any time. * @param array $tags * An array of tags to be stored with the cache item. These should normally * identify objects used to build the cache item, which should trigger * cache invalidation when updated. For example if a cached item represents * a node, both the node ID and the author's user ID might be passed in as * tags. For example ['node:123', 'node:456', 'user:789']. * * @see CacheBackendInterface */ public function setCache($data, int $expire = CacheBackendInterface::CACHE_PERMANENT, array $tags = []): void; }