Public Member Functions | Protected Member Functions | Protected Attributes

cache_none Class Reference

Inheritance diagram for cache_none:
cache_abstract object

Public Member Functions

 get (&$value, array $prm)
 save ()
 start (array $prm)
 end ()
 delete (array $prm=array())
 exists (array $prm)
 setCfg (array $cfg)
 isEnabled ()
 getAttr ($name)
 setAttr ($name, $value)
 getCfg ()

Protected Member Functions

 beforeInit ()
 afterInit ()

Protected Attributes

 $cfg

Detailed Description

Cache disabled

Definition at line 10 of file none.class.php.


Member Function Documentation

beforeInit (  )  [protected, inherited]

Call just before the configuration initialisation

Reimplemented in form_file.

Definition at line 35 of file object.class.php.

delete ( array $  prm = array()  ) 

Delete cached value. You can define what you want. If you define nothing, all the cache will be deleted.

Parameters:
array $prm Parameter for the cached variable to deleted:

  • string class: ClassName which created the cache (optionnal)
  • string function: function which created the cache (optionnal)
  • string type: Cache type, could be 'get' or 'start' (optionnal)
  • string id: Cache id (optionnal)
  • array tags: Tags for the id (optionnal)
Returns:
int|bool Number of cache deleted or false
See also:
get, start

Reimplemented from cache_abstract.

Definition at line 29 of file none.class.php.

end (  ) 

Save the output with the setting passed by the last call from start

Returns:
string The content cached
See also:
start

Reimplemented from cache_abstract.

Definition at line 24 of file none.class.php.

exists ( array $  prm  ) 

Indicate if a cache exists

Parameters:
array $prm Parameter for the cached variable:

  • string type: Cache type, must be 'get' or 'start' (required)
  • string id: Cache id (required)
  • array tags: Optionnal tags for the id
  • array request: Array for build the request ID (
See also:
cache::idRequest)
  • bool serialize: True if need to serialize the content (default: true)
Returns:
bool True if it exists
See also:
get, start

Reimplemented from cache_abstract.

Definition at line 33 of file none.class.php.

get ( &$  value,
array $  prm 
)

Try to get a variable cached. If not found, information will be stored and used with the next call from save. The cache id is made with 5 elements :

  • the $id passed to the function
  • the get, post, session or cookie variable if set
  • the class and function name where the cache is call
  • the tags if set
  • 'get' is added (to differenciate from output caching)
Parameters:
mixed $value the variable where the content must be placed
array $prm Parameter for the cached variable:

  • int ttl: Time to live, in minutes, 0 for eternal
  • string id: Cache id (required)
  • array tags: Optionnal tags for the id
  • array request: Array for build the request ID (
See also:
cache::idRequest)
  • bool serialize: True if need to serialize the content
Returns:
bool True if cache found and content in $value
See also:
save

Reimplemented from cache_abstract.

Definition at line 12 of file none.class.php.

getAttr ( name  )  [inherited]

Get an attribute

Parameters:
string $name Attribute name
Returns:
mixed|null The attribute or null if not set

Reimplemented in response_proxy.

Definition at line 48 of file object.class.php.

getCfg (  )  [inherited]

Get the configuration object

Returns:
config

Definition at line 67 of file object.class.php.

isEnabled (  )  [inherited]

Check if the cache is enabled

Returns:
bool

Definition at line 26 of file cache/abstract.class.php.

save (  ) 

Save the variable with the setting passed by the last call from get.

Returns:
bool True if success
See also:
get

Reimplemented from cache_abstract.

Definition at line 16 of file none.class.php.

setAttr ( name,
value 
) [inherited]

Set an attribute

Parameters:
string $name Attribute name
mixed $value Attribute value

Reimplemented in response_proxy.

Definition at line 58 of file object.class.php.

setCfg ( array $  cfg  )  [inherited]

Set the default config

Parameters:
array $cfg

Definition at line 17 of file cache/abstract.class.php.

start ( array $  prm  ) 

Try to get an output cached. If not found, information will be stored and used with the next call from end. The cache id is made with 5 elements :

  • the $id passed to the function
  • the get, post, session or cookie variable if set
  • the class and function name where the cache is call
  • the tags if set
  • 'cache' is added (to differenciate from variable caching)
Parameters:
array $prm Parameter for the cached variable:

  • int ttl: Time to live, in minutes, 0 for eternal
  • string id: Cache id (required)
  • array tags: Optionnal tags for the id
  • array request: Array for build the request ID (
See also:
cache::idRequest)
Returns:
bool True if cache found and content printed
See also:
end

Reimplemented from cache_abstract.

Definition at line 20 of file none.class.php.


Field Documentation

$cfg [protected, inherited]

Definition at line 17 of file object.class.php.


The documentation for this class was generated from the following file:
 All Data Structures Files Functions Variables Enumerations
Generated on Tue May 8 2012 16:02:25 for nyroFwk by doxygen 1.7.1