Class Smarty_CacheResource_Memcache

Description

Memcache CacheResource

CacheResource Implementation based on the KeyValueStore API to use memcache as the storage resource for Smarty's output caching.

Note that memcache has a limitation of 256 characters per cache-key. To avoid complications all cache-keys are translated to a sha1 hash.

  • author: Rodney Rehm

Located in /demo/plugins/cacheresource.memcache.php (line 15)

Smarty_CacheResource
   |
   --Smarty_CacheResource_KeyValueStore
      |
      --Smarty_CacheResource_Memcache
Variable Summary
Memcache $memcache
Method Summary
Smarty_CacheResource_Memcache __construct ()
boolean delete ( $keys)
boolean purge ()
array read ( $keys)
boolean write ( $keys, [int $expire = null])
Variables
Strict standards: Only variables should be passed by reference in C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty_Compiler.class.php on line 712 Call Stack: 0.0006 229032 1. {main}() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpdoc:0 0.0027 240216 2. include('C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\phpdoc.inc') C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpdoc:59 0.1463 8650352 3. phpDocumentor_setup->createDocs() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\phpdoc.inc:65 13.2331 130016152 4. phpDocumentor_IntermediateParser->Output() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Setup.inc.php:761 13.9644 131381624 5. phpDocumentor_IntermediateParser->Convert() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\IntermediateParser.inc:1865 13.9644 131381720 6. Converter->walk() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\IntermediateParser.inc:1652 15.5521 134430648 7. HTMLframesConverter->endClass() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Converter.inc:1936 15.5524 134431808 8. Smarty->fetch() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Converters\HTML\frames\HTMLframesConverter.inc:347 15.5925 134921104 9. include('C:\wamp\www\smarty3.1.0\development\Smarty3Doc\CacheResource-examples\26d3399f63abd43a7d72f8c21440dcb0\%%165^%%1653142046^class.tpl.php') C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1298 15.6128 135080880 10. Smarty->_smarty_include() C:\wamp\www\smarty3.1.0\development\Smarty3Doc\CacheResource-examples\26d3399f63abd43a7d72f8c21440dcb0\%%165^%%1653142046^class.tpl.php:585 15.6130 135085288 11. Smarty->_compile_resource() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1935 15.6139 135091984 12. Smarty->_compile_source() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1458 15.6143 135126256 13. Smarty_Compiler->_compile_file() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1523 15.6154 135173048 14. Smarty_Compiler->_compile_tag() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty_Compiler.class.php:316 15.6163 135173992 15. Smarty_Compiler->_compile_custom_tag() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty_Compiler.class.php:537 Strict standards: Only variables should be passed by reference in C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty_Compiler.class.php on line 712 Call Stack: 0.0006 229032 1. {main}() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpdoc:0 0.0027 240216 2. include('C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\phpdoc.inc') C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpdoc:59 0.1463 8650352 3. phpDocumentor_setup->createDocs() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\phpdoc.inc:65 13.2331 130016152 4. phpDocumentor_IntermediateParser->Output() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Setup.inc.php:761 13.9644 131381624 5. phpDocumentor_IntermediateParser->Convert() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\IntermediateParser.inc:1865 13.9644 131381720 6. Converter->walk() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\IntermediateParser.inc:1652 15.5521 134430648 7. HTMLframesConverter->endClass() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Converter.inc:1936 15.5524 134431808 8. Smarty->fetch() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Converters\HTML\frames\HTMLframesConverter.inc:347 15.5925 134921104 9. include('C:\wamp\www\smarty3.1.0\development\Smarty3Doc\CacheResource-examples\26d3399f63abd43a7d72f8c21440dcb0\%%165^%%1653142046^class.tpl.php') C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1298 15.6128 135080880 10. Smarty->_smarty_include() C:\wamp\www\smarty3.1.0\development\Smarty3Doc\CacheResource-examples\26d3399f63abd43a7d72f8c21440dcb0\%%165^%%1653142046^class.tpl.php:585 15.6130 135085288 11. Smarty->_compile_resource() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1935 15.6139 135091984 12. Smarty->_compile_source() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1458 15.6143 135126256 13. Smarty_Compiler->_compile_file() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1523 15.6218 135186088 14. Smarty_Compiler->_compile_tag() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty_Compiler.class.php:316 15.6224 135187008 15. Smarty_Compiler->_compile_custom_tag() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty_Compiler.class.php:537
Memcache $memcache = null (line 20)

memcache instance

  • access: protected

Inherited Variables

Inherited from Smarty_CacheResource_KeyValueStore

Smarty_CacheResource_KeyValueStore::$contents
Smarty_CacheResource_KeyValueStore::$timestamps

Inherited from Smarty_CacheResource

Smarty_CacheResource::$resources
Smarty_CacheResource::$sysplugins
Methods
Strict standards: Only variables should be passed by reference in C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty_Compiler.class.php on line 712 Call Stack: 0.0006 229032 1. {main}() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpdoc:0 0.0027 240216 2. include('C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\phpdoc.inc') C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpdoc:59 0.1463 8650352 3. phpDocumentor_setup->createDocs() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\phpdoc.inc:65 13.2331 130016152 4. phpDocumentor_IntermediateParser->Output() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Setup.inc.php:761 13.9644 131381624 5. phpDocumentor_IntermediateParser->Convert() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\IntermediateParser.inc:1865 13.9644 131381720 6. Converter->walk() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\IntermediateParser.inc:1652 15.5521 134430648 7. HTMLframesConverter->endClass() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Converter.inc:1936 15.5524 134431808 8. Smarty->fetch() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Converters\HTML\frames\HTMLframesConverter.inc:347 15.5925 134921104 9. include('C:\wamp\www\smarty3.1.0\development\Smarty3Doc\CacheResource-examples\26d3399f63abd43a7d72f8c21440dcb0\%%165^%%1653142046^class.tpl.php') C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1298 15.6400 135088504 10. Smarty->_smarty_include() C:\wamp\www\smarty3.1.0\development\Smarty3Doc\CacheResource-examples\26d3399f63abd43a7d72f8c21440dcb0\%%165^%%1653142046^class.tpl.php:686 15.6402 135092744 11. Smarty->_compile_resource() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1935 15.6405 135106552 12. Smarty->_compile_source() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1458 15.6408 135144192 13. Smarty_Compiler->_compile_file() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1523 15.6425 135238568 14. Smarty_Compiler->_compile_tag() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty_Compiler.class.php:316 15.6433 135239488 15. Smarty_Compiler->_compile_custom_tag() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty_Compiler.class.php:537 Strict standards: Only variables should be passed by reference in C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty_Compiler.class.php on line 712 Call Stack: 0.0006 229032 1. {main}() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpdoc:0 0.0027 240216 2. include('C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\phpdoc.inc') C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpdoc:59 0.1463 8650352 3. phpDocumentor_setup->createDocs() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\phpdoc.inc:65 13.2331 130016152 4. phpDocumentor_IntermediateParser->Output() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Setup.inc.php:761 13.9644 131381624 5. phpDocumentor_IntermediateParser->Convert() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\IntermediateParser.inc:1865 13.9644 131381720 6. Converter->walk() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\IntermediateParser.inc:1652 15.5521 134430648 7. HTMLframesConverter->endClass() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Converter.inc:1936 15.5524 134431808 8. Smarty->fetch() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Converters\HTML\frames\HTMLframesConverter.inc:347 15.5925 134921104 9. include('C:\wamp\www\smarty3.1.0\development\Smarty3Doc\CacheResource-examples\26d3399f63abd43a7d72f8c21440dcb0\%%165^%%1653142046^class.tpl.php') C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1298 15.6400 135088504 10. Smarty->_smarty_include() C:\wamp\www\smarty3.1.0\development\Smarty3Doc\CacheResource-examples\26d3399f63abd43a7d72f8c21440dcb0\%%165^%%1653142046^class.tpl.php:686 15.6402 135092744 11. Smarty->_compile_resource() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1935 15.6405 135106552 12. Smarty->_compile_source() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1458 15.6408 135144192 13. Smarty_Compiler->_compile_file() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1523 15.6510 135263672 14. Smarty_Compiler->_compile_tag() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty_Compiler.class.php:316 15.6516 135264592 15. Smarty_Compiler->_compile_custom_tag() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty_Compiler.class.php:537
Constructor __construct (line 22)
  • access: public
Smarty_CacheResource_Memcache __construct ()
delete (line 73)

Remove values from cache

  • return: true on success, false on failure
  • access: protected
boolean delete ( $keys)
  • array $keys: list of keys to delete

Redefinition of:
Smarty_CacheResource_KeyValueStore::delete()
Remove values from cache
purge (line 87)

Remove *all* values from cache

  • return: true on success, false on failure
  • access: protected
boolean purge ()

Redefinition of:
Smarty_CacheResource_KeyValueStore::purge()
Remove *all* values from cache
read (line 35)

Read values for a set of keys from cache

  • return: list of values with the given keys used as indexes
  • access: protected
array read ( $keys)
  • array $keys: list of keys to fetch

Redefinition of:
Smarty_CacheResource_KeyValueStore::read()
Read values for a set of keys from cache
write (line 58)

Save values for a set of keys to cache

  • return: true on success, false on failure
  • access: protected
boolean write ( $keys, [int $expire = null])
  • array $keys: list of values to save
  • int $expire: expiration time

Redefinition of:
Smarty_CacheResource_KeyValueStore::write()
Save values for a set of keys to cache

Inherited Methods

Inherited From Smarty_CacheResource_KeyValueStore

Smarty_CacheResource_KeyValueStore::acquireLock()
Smarty_CacheResource_KeyValueStore::addMetaTimestamp()
Smarty_CacheResource_KeyValueStore::clear()
Smarty_CacheResource_KeyValueStore::clearAll()
Smarty_CacheResource_KeyValueStore::delete()
Smarty_CacheResource_KeyValueStore::fetch()
Smarty_CacheResource_KeyValueStore::getLatestInvalidationTimestamp()
Smarty_CacheResource_KeyValueStore::getMetaTimestamp()
Smarty_CacheResource_KeyValueStore::getTemplateUid()
Smarty_CacheResource_KeyValueStore::hasLock()
Smarty_CacheResource_KeyValueStore::invalidate()
Smarty_CacheResource_KeyValueStore::listInvalidationKeys()
Smarty_CacheResource_KeyValueStore::populate()
Smarty_CacheResource_KeyValueStore::populateTimestamp()
Smarty_CacheResource_KeyValueStore::process()
Smarty_CacheResource_KeyValueStore::purge()
Smarty_CacheResource_KeyValueStore::read()
Smarty_CacheResource_KeyValueStore::releaseLock()
Smarty_CacheResource_KeyValueStore::sanitize()
Smarty_CacheResource_KeyValueStore::write()
Smarty_CacheResource_KeyValueStore::writeCachedContent()

Inherited From Smarty_CacheResource

Smarty_CacheResource::acquireLock()
Smarty_CacheResource::clear()
Smarty_CacheResource::clearAll()
Smarty_CacheResource::getCachedContent()
Smarty_CacheResource::hasLock()
Smarty_CacheResource::invalidLoadedCache()
Smarty_CacheResource::load()
Smarty_CacheResource::locked()
Smarty_CacheResource::populate()
Smarty_CacheResource::populateTimestamp()
Smarty_CacheResource::process()
Smarty_CacheResource::releaseLock()
Smarty_CacheResource::writeCachedContent()

Documentation generated on Mon, 17 Jun 2013 21:06:40 +0000 by phpDocumentor 1.4.3