1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- <?php
- namespace Doctrine\Common\Cache;
- class ZendDataCache extends CacheProvider
- {
-
- protected function doFetch($id)
- {
- return zend_shm_cache_fetch($id);
- }
-
- protected function doContains($id)
- {
- return (false !== zend_shm_cache_fetch($id));
- }
-
- protected function doSave($id, $data, $lifeTime = 0)
- {
- return zend_shm_cache_store($id, $data, $lifeTime);
- }
-
- protected function doDelete($id)
- {
- return zend_shm_cache_delete($id);
- }
-
- protected function doFlush()
- {
- $namespace = $this->getNamespace();
- if (empty($namespace)) {
- return zend_shm_cache_clear();
- }
- return zend_shm_cache_clear($namespace);
- }
-
- protected function doGetStats()
- {
- return null;
- }
- }
|