Class: Doctrine_Cache_Array

Source Location: /Doctrine/Cache/Array.php

Class Doctrine_Cache_Array

Class Overview

Implements interfaces:

Doctrine_Cache_Interface

Located in /Doctrine/Cache/Array.php [line 34]



		
				Author(s):
		
		
		
Information Tags:
Version:  $Revision: 1495 $
Link:  www.phpdoctrine.com
Since:  1.0
License:  LGPL

Properties

Methods

[ Top ]
Property Summary
array   $data  

[ Top ]
Method Summary
mixed   contains()   Test if a cache is available or not (for the given id)
integer   count()   count
boolean   delete()   Remove a cache record
boolean   deleteAll()   Remove all cache record
string   fetch()   Test if a cache is available for the given id and (if yes) return it (false else)
boolean   save()   Save some string datas into a cache record

[ Top ]
Properties
array   $data [line 39]
API Tags:
Access:  protected


[ Top ]
Methods
contains  [line 63]

  mixed contains( string $id  )

Test if a cache is available or not (for the given id)

Parameters:
string   $id:  cache id

API Tags:
Return:  false (a cache is not available) or "last modified" timestamp (int) of the available cache record
Access:  public


Implementation of:
Doctrine_Cache_Interface::contains()
Test if a cache is available or not (for the given id)

[ Top ]
count  [line 105]

  integer count( )

count


API Tags:
Access:  public


Implementation of:
Countable::count

[ Top ]
delete  [line 87]

  boolean delete( string $id  )

Remove a cache record

Parameters:
string   $id:  cache id

API Tags:
Return:  true if no problem
Access:  public


Implementation of:
Doctrine_Cache_Interface::delete()
Remove a cache record

[ Top ]
deleteAll  [line 96]

  boolean deleteAll( )

Remove all cache record


API Tags:
Return:  true if no problem
Access:  public


[ Top ]
fetch  [line 50]

  string fetch( string $id, [boolean $testCacheValidity = true]  )

Test if a cache is available for the given id and (if yes) return it (false else)

Note : return value is always "string" (unserialization is done by the core not by the backend)

Parameters:
string   $id:  cache id
boolean   $testCacheValidity:  if set to false, the cache validity won't be tested

API Tags:
Return:  cached datas (or false)
Access:  public


Implementation of:
Doctrine_Cache_Interface::fetch()
Test if a cache is available for the given id and (if yes) return it (false else)

[ Top ]
save  [line 77]

  boolean save( string $id, string $data, [int $lifeTime = false]  )

Save some string datas into a cache record

Note : $data is always saved as a string

Parameters:
string   $data:  data to cache
string   $id:  cache id
int   $lifeTime:  if != false, set a specific lifetime for this cache record (null => infinite lifeTime)

API Tags:
Return:  true if no problem
Access:  public


Implementation of:
Doctrine_Cache_Interface::save()
Save some string datas into a cache record

[ Top ]