Project

General

Profile

Bug #19579 » 0009747_v2.patch

Administrator Admin, 2008-11-06 19:35

View differences:

t3lib/cache/class.t3lib_cache_abstractcache.php (Arbeitskopie)
* @return void
* @author Robert Lemke <robert@typo3.org>
*/
abstract public function save($entryIdentifier, $data, array $tags = array(), $lifetime = null);
abstract public function set($entryIdentifier, $data, array $tags = array(), $lifetime = null);
/**
* Loads data from the cache.
......
* @return mixed
* @author Robert Lemke <robert@typo3.org>
*/
abstract public function load($entryIdentifier);
abstract public function get($entryIdentifier);
/**
* Finds, loads, and returns all cache entries which are tagged by the specified tag.
......
* @return array An array with all matching entries. An empty array if no entries matched
* @author Ingo Renner <ingo@typo3.org>
*/
public function loadByTag($tag) {
public function getByTag($tag) {
$loadedEntries = array();
$foundEntries = $this->findEntriesByTag($tag);
foreach($foundEntries as $foundEntryIdentifier) {
$loadedEntries[$foundEntryIdentifier] = $this->load($foundEntryIdentifier);
$loadedEntries[$foundEntryIdentifier] = $this->get($foundEntryIdentifier);
}
return $loadedEntries;
t3lib/cache/class.t3lib_cache_variablecache.php (Arbeitskopie)
* @return void
* @author Robert Lemke <robert@typo3.org>
*/
public function save($entryIdentifier, $variable, array $tags = array(), $lifetime = null) {
$this->backend->save($entryIdentifier, serialize($variable), $tags, $lifetime);
public function set($entryIdentifier, $variable, array $tags = array(), $lifetime = null) {
$this->backend->set($entryIdentifier, serialize($variable), $tags, $lifetime);
}
/**
......
* @author Robert Lemke <robert@typo3.org>
* @throws t3lib_cache_exception_ClassAlreadyLoaded if the class already exists
*/
public function load($entryIdentifier) {
return unserialize($this->backend->load($entryIdentifier));
public function get($entryIdentifier) {
return unserialize($this->backend->get($entryIdentifier));
}
/**
t3lib/cache/class.t3lib_cache_abstractbackend.php (Arbeitskopie)
* @throws InvalidArgumentException if the identifier is not valid
* @throws t3lib_cache_Exception_InvalidData if the data is not a string
*/
abstract public function save($entryIdentifier, $data, array $tags = array(), $lifetime = NULL);
abstract public function set($entryIdentifier, $data, array $tags = array(), $lifetime = NULL);
/**
* Loads data from the cache.
......
* @param string An identifier which describes the cache entry to load
* @return mixed The cache entry's content as a string or FALSE if the cache entry could not be loaded
*/
abstract public function load($entryIdentifier);
abstract public function get($entryIdentifier);
/**
* Checks if a cache entry with the specified identifier exists.
t3lib/cache/backend/class.t3lib_cache_backend_file.php (Arbeitskopie)
* @throws t3lib_cache_Exception if the directory does not exist or is not writable, or if no cache frontend has been set.
* @author Robert Lemke <robert@typo3.org>
*/
public function save($entryIdentifier, $data, array $tags = array(), $lifetime = NULL) {
public function set($entryIdentifier, $data, array $tags = array(), $lifetime = NULL) {
if (!self::isValidEntryIdentifier($entryIdentifier)) {
throw new InvalidArgumentException(
'"' . $entryIdentifier . '" is not a valid cache entry identifier.',
......
* @return mixed The cache entry's content as a string or FALSE if the cache entry could not be loaded
* @author Robert Lemke <robert@typo3.org>
*/
public function load($entryIdentifier) {
public function get($entryIdentifier) {
$pathsAndFilenames = $this->findCacheFilesByEntry($entryIdentifier);
$cacheEntry = FALSE;
t3lib/cache/backend/class.t3lib_cache_backend_globals.php (Arbeitskopie)
* @throws t3lib_cache_Exception if the directory does not exist or is not writable, or if no cache frontend has been set.
* @author Ingo Renner <ingo@typo3.org>
*/
public function save($entryIdentifier, $data, array $tags = array(), $lifetime = NULL) {
public function set($entryIdentifier, $data, array $tags = array(), $lifetime = NULL) {
if (!self::isValidEntryIdentifier($entryIdentifier)) {
throw new InvalidArgumentException(
'"' . $entryIdentifier . '" is not a valid cache entry identifier.',
......
* @return mixed The cache entry's content as a string or FALSE if the cache entry could not be loaded
* @author Ingo Renner <ingo@typo3.org>
*/
public function load($entryIdentifier) {
public function get($entryIdentifier) {
$cacheEntry = FALSE;
if (isset($GLOBALS['typo3CacheStorage'][$this->cache->getIdentifier()]['data'][$entryIdentifier])) {
t3lib/cache/backend/class.t3lib_cache_backend_db.php (Arbeitskopie)
* @throws t3lib_cache_Exception if the directory does not exist or is not writable, or if no cache frontend has been set.
* @author Ingo Renner <ingo@typo3.org>
*/
public function save($entryIdentifier, $data, array $tags = array(), $lifetime = NULL) {
public function set($entryIdentifier, $data, array $tags = array(), $lifetime = NULL) {
if (is_null($lifetime)) {
$lifetime = $this->defaultLifetime;
}
......
* @return mixed The cache entry's data as a string or FALSE if the cache entry could not be loaded
* @author Ingo Renner <ingo@typo3.org>
*/
public function load($entryIdentifier) {
public function get($entryIdentifier) {
$cacheEntry = false;
$caheEntries = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
t3lib/cache/backend/class.t3lib_cache_backend_memcached.php (Arbeitskopie)
* @author Christian Jul Jensen <julle@typo3.org>
* @author Karsten Dambekalns <karsten@typo3.org>
**/
public function save($entryIdentifier, $data, array $tags = array(), $lifetime = NULL) {
public function set($entryIdentifier, $data, array $tags = array(), $lifetime = NULL) {
if (!self::isValidEntryIdentifier($entryIdentifier)) {
throw new InvalidArgumentException(
'"' . $entryIdentifier . '" is not a valid cache entry identifier.',
......
* @author Christian Jul Jensen <julle@typo3.org>
* @author Karsten Dambekalns <karsten@typo3.org>
*/
public function load($entryIdentifier) {
public function get($entryIdentifier) {
return $this->memcache->get($this->identifierPrefix . $entryIdentifier);
}
......
$entries = array();
$identifiers = $this->findIdentifiersTaggedWith($tag);
foreach($identifiers as $identifier) {
$entries[] = $this->load($identifier);
$entries[] = $this->get($identifier);
}
return $entries;
t3lib/cache/backend/class.t3lib_cache_backend_null.php (Arbeitskopie)
* @return void
* @author Robert Lemke <robert@typo3.org>
*/
public function save($entryIdentifier, $data, array $tags = array(), $lifetime = NULL) {
public function set($entryIdentifier, $data, array $tags = array(), $lifetime = NULL) {
}
/**
......
* @return boolean FALSE
* @author Robert Lemke <robert@typo3.org>
*/
public function load($entryIdentifier) {
public function get($entryIdentifier) {
return FALSE;
}
t3lib/class.t3lib_tstemplate.php (Arbeitskopie)
$pageSectionCache = $GLOBALS['typo3CacheManager']->getCache('cache_pagesection');
/* @var $pageSectionCache t3lib_cache_AbstractCache */
$cacheEntry = $pageSectionCache->load(
$cacheEntry = $pageSectionCache->get(
intval($GLOBALS['TSFE']->id) . '_' . t3lib_div::md5int($GLOBALS['TSFE']->MP)
);
......
$mpvarHash = t3lib_div::md5int($GLOBALS['TSFE']->MP);
$pageSectionCache->save(
$pageSectionCache->set(
intval($GLOBALS['TSFE']->id) . '_' . $mpvarHash,
serialize($cc),
array(
t3lib/class.t3lib_befunc.php (Arbeitskopie)
* @return void
*/
public static function storeHash($hash, $data, $ident) {
$GLOBALS['typo3CacheManager']->getCache('cache_hash')->save(
$GLOBALS['typo3CacheManager']->getCache('cache_hash')->set(
$hash,
$data,
array('ident_' . $ident),
......
$hashContent = null;
$contentHashCache = $GLOBALS['typo3CacheManager']->getCache('cache_hash');
$cacheEntry = $contentHashCache->load($hash);
$cacheEntry = $contentHashCache->get($hash);
if ($cacheEntry) {
$hashContent = $cacheEntry;
t3lib/class.t3lib_page.php (Arbeitskopie)
$hashContent = null;
$contentHashCache = $GLOBALS['typo3CacheManager']->getCache('cache_hash');
$cacheEntry = $contentHashCache->load($hash);
$cacheEntry = $contentHashCache->get($hash);
if ($cacheEntry) {
$hashContent = $cacheEntry;
......
* @see tslib_TStemplate::start(), getHash()
*/
public static function storeHash($hash, $data, $ident, $lifetime = 0) {
$GLOBALS['typo3CacheManager']->getCache('cache_hash')->save(
$GLOBALS['typo3CacheManager']->getCache('cache_hash')->set(
$hash,
$data,
array('ident_' . $ident),
typo3/sysext/cms/tslib/class.tslib_fe.php (Arbeitskopie)
*/
function getFromCache_queryRow() {
$GLOBALS['TT']->push('Cache Query', '');
$cachedPage = $this->pageCache->load($this->newHash);
$cachedPage = $this->pageCache->get($this->newHash);
$GLOBALS['TT']->pull();
return $cachedPage;
......
$this->pageCacheTags[] = 'reg1_' . $reg1;
}
$this->pageCache->save(
$this->pageCache->set(
$cacheData['hash'],
$cacheData,
$this->pageCacheTags,
(2-2/2)