PHP Interface LdapTools\Cache\CacheInterface

Author: Chad Sikorra ([email protected])
Datei anzeigen Open project: ldaptools/ldaptools Interface Usage Examples

Public Methods

Method 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 method

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

delete() public method

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 method

Delete all items from the cache.
public deleteAll ( ) : boolean
return boolean

get() public method

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
return mixed

getCacheCreationTime() public method

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
return boolean | DateTime

getUseAutoCache() public method

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

set() public method

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

setOptions() public method

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