MIOLO20
Carregando...
Procurando...
Nenhuma entrada encontrada
Referência à classe AbstractCache
Diagrama de heranças da classe AbstractCache
Cache ApcCache ArrayCache MemcacheCache XcacheCache

Membros públicos

 setNamespace ($namespace)
 
 fetch ($id)
 
 contains ($id)
 
 save ($id, $data, $lifeTime=0)
 
 delete ($id)
 
 deleteAll ()
 
 deleteByRegex ($regex)
 
 deleteByPrefix ($prefix)
 
 deleteBySuffix ($suffix)
 
 getIds ()
 

Membros protegidos

 _doFetch ($id)
 
 _doContains ($id)
 
 _doSave ($id, $data, $lifeTime=false)
 
 _doDelete ($id)
 

Descrição detalhada

Base class for cache driver implementations.

Desde
2.0
Autor
Benjamin Eberlei konta.nosp@m.kt@b.nosp@m.eberl.nosp@m.ei.d.nosp@m.e
Guilherme Blanco guilh.nosp@m.erme.nosp@m.blanc.nosp@m.o@ho.nosp@m.tmail.nosp@m..com
Jonathan Wage jonwa.nosp@m.ge@g.nosp@m.mail..nosp@m.com
Roman Borschel roman.nosp@m.@cod.nosp@m.e-fac.nosp@m.tory.nosp@m..org

Definido na linha 31 do ficheiro AbstractCache.php.

Documentação das funções

◆ _doContains()

_doContains ( $id)
abstractprotected

Test if an entry exists in the cache.

Parâmetros
string$idcache id The cache id of the entry to check for.
Retorna
boolean TRUE if a cache entry exists for the given cache id, FALSE otherwise.

Reimplementado em ApcCache, ArrayCache, MemcacheCache e XcacheCache.

◆ _doDelete()

_doDelete ( $id)
abstractprotected

Deletes a cache entry.

Parâmetros
string$idcache id
Retorna
boolean TRUE if the cache entry was successfully deleted, FALSE otherwise.

Reimplementado em ApcCache, ArrayCache, MemcacheCache e XcacheCache.

◆ _doFetch()

_doFetch ( $id)
abstractprotected

Fetches an entry from the cache.

Parâmetros
string$idcache id The id of the cache entry to fetch.
Retorna
string The cached data or FALSE, if no cache entry exists for the given id.

Reimplementado em ApcCache, ArrayCache, MemcacheCache e XcacheCache.

◆ _doSave()

_doSave ( $id,
$data,
$lifeTime = false )
abstractprotected

Puts data into the cache.

Parâmetros
string$idThe cache id.
string$dataThe cache entry/data.
int$lifeTimeThe lifetime. If != false, sets a specific lifetime for this cache entry (null => infinite lifeTime).
Retorna
boolean TRUE if the entry was successfully stored in the cache, FALSE otherwise.

Reimplementado em ApcCache, ArrayCache, MemcacheCache e XcacheCache.

◆ contains()

contains ( $id)

{Test if an entry exists in the cache.

Parâmetros
string$idcache id The cache id of the entry to check for.
Retorna
boolean TRUE if a cache entry exists for the given cache id, FALSE otherwise.
}

Implementa Cache.

Definido na linha 61 do ficheiro AbstractCache.php.

◆ delete()

delete ( $id)

{Deletes a cache entry.

Parâmetros
string$idcache id
Retorna
boolean TRUE if the cache entry was successfully deleted, FALSE otherwise.
}

Implementa Cache.

Definido na linha 77 do ficheiro AbstractCache.php.

◆ deleteAll()

deleteAll ( )

Delete all cache entries.

Retorna
array $deleted Array of the deleted cache ids

Definido na linha 93 do ficheiro AbstractCache.php.

◆ deleteByPrefix()

deleteByPrefix ( $prefix)

Delete cache entries where the id has the passed prefix

Parâmetros
string$prefix
Retorna
array $deleted Array of the deleted cache ids

Definido na linha 132 do ficheiro AbstractCache.php.

◆ deleteByRegex()

deleteByRegex ( $regex)

Delete cache entries where the id matches a PHP regular expressions

Parâmetros
string$regex
Retorna
array $deleted Array of the deleted cache ids

Definido na linha 110 do ficheiro AbstractCache.php.

◆ deleteBySuffix()

deleteBySuffix ( $suffix)

Delete cache entries where the id has the passed suffix

Parâmetros
string$suffix
Retorna
array $deleted Array of the deleted cache ids

Definido na linha 155 do ficheiro AbstractCache.php.

◆ fetch()

fetch ( $id)

{Fetches an entry from the cache.

Parâmetros
string$idcache id The id of the cache entry to fetch.
Retorna
string The cached data or FALSE, if no cache entry exists for the given id.
}

Implementa Cache.

Definido na linha 53 do ficheiro AbstractCache.php.

◆ getIds()

getIds ( )
abstract

Get an array of all the cache ids stored

Retorna
array $ids

Reimplementado em ApcCache, ArrayCache, MemcacheCache e XcacheCache.

◆ save()

save ( $id,
$data,
$lifeTime = 0 )

{Puts data into the cache.

Parâmetros
string$idThe cache id.
string$dataThe cache entry/data.
int$lifeTimeThe lifetime. If != 0, sets a specific lifetime for this cache entry (0 => infinite lifeTime).
Retorna
boolean TRUE if the entry was successfully stored in the cache, FALSE otherwise.
}

Implementa Cache.

Definido na linha 69 do ficheiro AbstractCache.php.

◆ setNamespace()

setNamespace ( $namespace)

Set the namespace to prefix all cache ids with.

Parâmetros
string$namespace
Retorna
void

Definido na linha 45 do ficheiro AbstractCache.php.


A documentação para esta classe foi gerada a partir do seguinte ficheiro: