.. rst-class:: phpdoctorst .. role:: php(code) :language: php CacheableServiceInterface ========================= .. php:namespace:: Firstred\PostNL\Cache .. php:interface:: CacheableServiceInterface :Parent: :php:interface:`Firstred\\PostNL\\Service\\ServiceInterface` :Parent: :php:interface:`Firstred\\PostNL\\Clock\\ClockAwareInterface` Summary ------- Methods ~~~~~~~ * :php:meth:`public cacheResponseItem\($item\)` * :php:meth:`public retrieveCachedResponseItem\($cacheableRequestEntity\)` * :php:meth:`public removeCachedResponseItem\($item\)` * :php:meth:`public getTtl\(\)` * :php:meth:`public setTtl\($ttl\)` * :php:meth:`public getCache\(\)` * :php:meth:`public setCache\($cache\)` Methods ------- .. rst-class:: public .. php:method:: public cacheResponseItem( $item) .. rst-class:: phpdoc-description | Cache an item\. :Parameters: * **$item** (:any:`Psr\\Cache\\CacheItemInterface `) :Since: 2.0.0 .. rst-class:: public .. php:method:: public retrieveCachedResponseItem( $cacheableRequestEntity) .. rst-class:: phpdoc-description | Retrieve a cached item\. :Parameters: * **$cacheableRequestEntity** (:any:`Firstred\\PostNL\\Cache\\CacheableRequestEntityInterface `) :Returns: :any:`\\Psr\\Cache\\CacheItemInterface ` | null :Throws: :any:`\\Psr\\Cache\\InvalidArgumentException ` :Since: 2.0.0 .. rst-class:: public .. php:method:: public removeCachedResponseItem( $item) .. rst-class:: phpdoc-description | Delete an item from cache\. :Parameters: * **$item** (:any:`Psr\\Cache\\CacheItemInterface `) :Since: 2.0.0 .. rst-class:: public .. php:method:: public getTtl() :Returns: :any:`\\DateInterval ` | :any:`\\DateTimeInterface ` | int | null :Since: 1.2.0 .. rst-class:: public .. php:method:: public setTtl(\\DateInterval|\\DateTimeInterface|int $ttl=null) :Parameters: * **$ttl** (:any:`DateInterval ` | :any:`\\DateTimeInterface ` | int | null) :Returns: static :Since: 1.2.0 .. rst-class:: public .. php:method:: public getCache() :Returns: :any:`\\Psr\\Cache\\CacheItemPoolInterface ` | null :Since: 1.2.0 .. rst-class:: public .. php:method:: public setCache( $cache=null) :Parameters: * **$cache** (:any:`Psr\\Cache\\CacheItemPoolInterface ` | null) :Returns: static :Since: 1.2.0