Stud.IP  6.0
FileCache Class Reference
Inheritance diagram for FileCache:
Cache

Public Member Functions

 __construct (string $path='')
 
 getCacheDir ()
 
 expire ($arg)
 
 flush ()
 
 purge (bool $be_quiet=true)
 
 getStats ()
 
 getItem (string $key)
 
 hasItem (string $key)
 
 save (CacheItemInterface $item)
 
- Public Member Functions inherited from Cache
 getStats ()
 
 expire ($arg)
 
 flush ()
 
 getItem (string $key)
 
 hasItem (string $key)
 
 read ($arg)
 
 write ($name, $content, $expires=self::DEFAULT_EXPIRATION)
 
 getExpiration (CacheItemInterface $item)
 
 getItems (array $keys=[])
 
 clear ()
 
 deleteItem ($key)
 
 deleteItems (array $keys)
 
 saveDeferred (CacheItemInterface $item)
 
 commit ()
 

Static Public Member Functions

static getDisplayName ()
 
static getConfig ()
 
- Static Public Member Functions inherited from Cache
static getDisplayName ()
 
static getConfig ()
 

Additional Inherited Members

- Data Fields inherited from Cache
const DEFAULT_EXPIRATION = 12 * 60 * 60
 
- Protected Attributes inherited from Cache
array $deferred_items = []
 

Detailed Description

Cache implementation using files

Author
André Noack noack.nosp@m.@dat.nosp@m.a-que.nosp@m.st.d.nosp@m.e

Constructor & Destructor Documentation

◆ __construct()

__construct ( string  $path = '')

without the 'dir' argument the cache path is taken from $CACHING_FILECACHE_PATH or is set to $TMP_PATH/studip_cache

Parameters
string$paththe path to use
Exceptions
Exceptionif the directory does not exist or could not be created

Member Function Documentation

◆ expire()

expire (   $arg)

expire cache item

Parameters
string$arg
Returns
void
Exceptions
Exception
See also
Cache::expire()

◆ flush()

flush ( )

Expire all items from the cache.

◆ getCacheDir()

getCacheDir ( )

get path to cache directory

Returns
string

◆ getConfig()

static getConfig ( )
static

Return the Vue component name and props that handle configuration.

Returns
array

◆ getDisplayName()

static getDisplayName ( )
static
Returns
string A translateable display name for this cache class.

◆ getItem()

getItem ( string  $key)

◆ getStats()

getStats ( )

Return statistics.

Returns
array|array[]

◆ hasItem()

hasItem ( string  $key)

◆ purge()

purge ( bool  $be_quiet = true)

purges expired entries from the cache directory

Parameters
bool$be_quietecho messages if set to false
Returns
int the number of deleted files

◆ save()

save ( CacheItemInterface  $item)

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