Bug #19579 » 0009747.patch
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/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/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,
|