Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
core\local\guzzle\cache_storage Class Reference
Inheritance diagram for core\local\guzzle\cache_storage:
Kevinrob\GuzzleCache\Storage\CacheStorageInterface

Public Member Functions

 __construct (cache_handler $cachepool, ?int $ttl=null)
 
 delete ($key)
 
 fetch ($key)
 
 save ($key, CacheEntry $data)
 

Protected Attributes

cache_handler $cachepool
 The cache pool.
 
cache_item null $lastitem
 The last item retrieved from the cache.
 

Member Function Documentation

◆ delete()

core\local\guzzle\cache_storage::delete ( $key)
Parameters
string$key
Return values
bool

Implements Kevinrob\GuzzleCache\Storage\CacheStorageInterface.

◆ fetch()

core\local\guzzle\cache_storage::fetch ( $key)

◆ save()

core\local\guzzle\cache_storage::save ( $key,
CacheEntry $data )
Parameters
string$key
CacheEntry$data
Return values
bool

Implements Kevinrob\GuzzleCache\Storage\CacheStorageInterface.

Member Data Documentation

◆ $lastitem

cache_item null core\local\guzzle\cache_storage::$lastitem
protected

The last item retrieved from the cache.

This item is transiently stored so that save() can reuse the cache item usually retrieved by fetch() beforehand, instead of requesting it a second time.


The documentation for this class was generated from the following file: