Source for file MemcachedStorage.php
Documentation is available at MemcachedStorage.php
- 1: <?php
- 3: /**
- 4: * Nette Framework
- 5: *
- 6: * Copyright (c) 2004, 2009 David Grudl (http://davidgrudl.com)
- 7: *
- 8: * This source file is subject to the "Nette license" that is bundled
- 9: * with this package in the file license.txt.
- 10: *
- 11: * For more information please see http://nettephp.com
- 12: *
- 18: */
- 28: /**
- 29: * Memcached storage.
- 30: *
- 34: */
- 36: {
- 37: /**#@+ @ignore internal cache structure */
- 41: /**#@-*/
- 51: /**
- 52: * Checks if Memcached extension is available.
- 54: */
- 56: {
- 58: }
- 63: {
- 66: }
- 71: }
- 75: /**
- 76: * Read from cache.
- 79: */
- 81: {
- 86: // meta structure:
- 87: // array(
- 88: // data => stored data
- 89: // delta => relative (sliding) expiration
- 90: // callbacks => array of callbacks (function, args)
- 91: // )
- 93: // verify dependencies
- 94: if (!empty($meta[self::META_CALLBACKS]) && !Cache::checkCallbacks($meta[self::META_CALLBACKS])) {
- 97: }
- 101: }
- 104: }
- 108: /**
- 109: * Writes item into the cache.
- 114: */
- 116: {
- 118: throw new NotSupportedException('Tags, priority and dependent items are not supported by MemcachedStorage.');
- 119: }
- 130: }
- 131: }
- 135: }
- 138: }
- 142: /**
- 143: * Removes item from the cache.
- 146: */
- 148: {
- 150: }
- 154: /**
- 155: * Removes items from the cache by conditions & garbage collector.
- 158: */
- 160: {
- 166: }
- 169: }
- 171: }