CacheEngine Class Info:

Class Declaration:

class CacheEngine

File name:
cake/libs/cache.php
Description:

Storage engine for CakePHP caching

Package
cake
Subpackage
cake.cake.libs

Properties:

Show/Hide parent properties
  • settings int

    Settings of current engine instance

clear

top

Delete all keys from the cache

Parameters:
  • boolean $check required

    if true will check expiration, otherwise delete all

Method defined in:
cake/libs/cache.php on line 648
Return

boolean True if the cache was succesfully cleared, false otherwise

Access

public

decrement

top

Decrement a number under the key and return decremented value

Parameters:
  • string $key required

    Identifier for the data

  • $offset optional 1

Method defined in:
cake/libs/cache.php on line 628
Return

New incremented value, false otherwise

Access

public

delete

top

Delete a key from the cache

Parameters:
  • string $key required

    Identifier for the data

Method defined in:
cake/libs/cache.php on line 638
Return

boolean True if the value was succesfully deleted, false if it didn't exist or couldn't be removed

Access

public

gc

top

Garbage collection

Permanently remove all expired and deleted data

Method defined in:
cake/libs/cache.php on line 582
Access

public

increment

top

Increment a number under the key and return incremented value

Parameters:
  • string $key required

    Identifier for the data

  • integer $offset optional 1

    How much to add

Method defined in:
cake/libs/cache.php on line 617
Return

New incremented value, false otherwise

Access

public

init

top

Initialize the cache engine

Called automatically by the cache frontend

Parameters:
  • $settings optional array ( )

Method defined in:
cake/libs/cache.php on line 563
Return

boolean True if the engine has been succesfully initialized, false if not

Access

public

key

top

Generates a safe key for use with cache engine storage engines.

Parameters:
  • string $key required

    the key passed over

Method defined in:
cake/libs/cache.php on line 668
Return

mixed string $key or false

Access

public

read

top

Read a key from the cache

Parameters:
  • string $key required

    Identifier for the data

Method defined in:
cake/libs/cache.php on line 605
Return

mixed The cached data, or false if the data doesn't exist, has expired, or if there was an error fetching it

Access

public

settings

top

Cache Engine settings

Method defined in:
cake/libs/cache.php on line 657
Return

array settings

Access

public

write

top

Write value for a key into cache

Parameters:
  • string $key required

    Identifier for the data

  • mixed $value required

    Data to be cached

  • mixed $duration required

    How long to cache the data, in seconds

Method defined in:
cake/libs/cache.php on line 594
Return

boolean True if the data was succesfully cached, false on failure

Access

public