PHP Interface LdapTools\Cache\CacheInterface

Author: Chad Sikorra ([email protected])
Afficher le fichier Open project: ldaptools/ldaptools Interface Usage Examples

Méthodes publiques

Méthode Description
contains ( string $itemType, string $itemName ) : boolean Whether the item is in the cache.
delete ( string $type, string $name ) Delete a specific item from the cache.
deleteAll ( ) : boolean Delete all items from the cache.
get ( $itemType, $itemName ) : mixed Retrieve an item from the cache. If it is not in the cache it should return null. However, you should call the contains method first rather than relying on that value.
getCacheCreationTime ( $itemType, $itemName ) : boolean | DateTime Retrieve the time a cache item was created. Return false if there is no item in the cache.
getUseAutoCache ( ) : boolean Whether to auto refresh cache based on creation/modification times instead of a manual process.
set ( LdapTools\Cache\CacheableItemInterface $item ) Cache an item.
setOptions ( array $options ) Sets any configured options for the Cache type.

Method Details

contains() public méthode

Whether the item is in the cache.
public contains ( string $itemType, string $itemName ) : boolean
$itemType string
$itemName string
Résultat boolean

delete() public méthode

Delete a specific item from the cache.
public delete ( string $type, string $name )
$type string The item type.
$name string The item name.

deleteAll() public méthode

Delete all items from the cache.
public deleteAll ( ) : boolean
Résultat boolean

get() public méthode

Retrieve an item from the cache. If it is not in the cache it should return null. However, you should call the contains method first rather than relying on that value.
public get ( $itemType, $itemName ) : mixed
$itemType
$itemName
Résultat mixed

getCacheCreationTime() public méthode

Retrieve the time a cache item was created. Return false if there is no item in the cache.
public getCacheCreationTime ( $itemType, $itemName ) : boolean | DateTime
$itemType
$itemName
Résultat boolean | DateTime

getUseAutoCache() public méthode

Whether to auto refresh cache based on creation/modification times instead of a manual process.
public getUseAutoCache ( ) : boolean
Résultat boolean

set() public méthode

Cache an item.
public set ( LdapTools\Cache\CacheableItemInterface $item )
$item LdapTools\Cache\CacheableItemInterface

setOptions() public méthode

Sets any configured options for the Cache type.
public setOptions ( array $options )
$options array