independent-analytics
/
vendor
/
doctrine
/
cache
/
lib
/
Doctrine
/
Common
/
Cache
/
ZendDataCache.php
independent-analytics
/
vendor
/
doctrine
/
cache
/
lib
/
Doctrine
/
Common
/
Cache
Last commit date
Psr6
2 years ago
ApcCache.php
2 years ago
ApcuCache.php
2 years ago
ArrayCache.php
2 years ago
Cache.php
2 years ago
CacheProvider.php
2 years ago
ChainCache.php
2 years ago
ClearableCache.php
2 years ago
CouchbaseBucketCache.php
2 years ago
CouchbaseCache.php
2 years ago
ExtMongoDBCache.php
2 years ago
FileCache.php
2 years ago
FilesystemCache.php
2 years ago
FlushableCache.php
2 years ago
InvalidCacheId.php
2 years ago
LegacyMongoDBCache.php
2 years ago
MemcacheCache.php
2 years ago
MemcachedCache.php
2 years ago
MongoDBCache.php
2 years ago
MultiDeleteCache.php
2 years ago
MultiGetCache.php
2 years ago
MultiOperationCache.php
2 years ago
MultiPutCache.php
2 years ago
PhpFileCache.php
2 years ago
PredisCache.php
2 years ago
RedisCache.php
2 years ago
SQLite3Cache.php
2 years ago
Version.php
2 years ago
VoidCache.php
2 years ago
WinCacheCache.php
2 years ago
XcacheCache.php
2 years ago
ZendDataCache.php
2 years ago
ZendDataCache.php
66 lines
| 1 | <?php |
| 2 | |
| 3 | namespace IAWP_SCOPED\Doctrine\Common\Cache; |
| 4 | |
| 5 | use function zend_shm_cache_clear; |
| 6 | use function zend_shm_cache_delete; |
| 7 | use function zend_shm_cache_fetch; |
| 8 | use function zend_shm_cache_store; |
| 9 | /** |
| 10 | * Zend Data Cache cache driver. |
| 11 | * |
| 12 | * @deprecated Deprecated without replacement in doctrine/cache 1.11. This class will be dropped in 2.0 |
| 13 | * |
| 14 | * @link www.doctrine-project.org |
| 15 | * @internal |
| 16 | */ |
| 17 | class ZendDataCache extends CacheProvider |
| 18 | { |
| 19 | /** |
| 20 | * {@inheritdoc} |
| 21 | */ |
| 22 | protected function doFetch($id) |
| 23 | { |
| 24 | return zend_shm_cache_fetch($id); |
| 25 | } |
| 26 | /** |
| 27 | * {@inheritdoc} |
| 28 | */ |
| 29 | protected function doContains($id) |
| 30 | { |
| 31 | return zend_shm_cache_fetch($id) !== \false; |
| 32 | } |
| 33 | /** |
| 34 | * {@inheritdoc} |
| 35 | */ |
| 36 | protected function doSave($id, $data, $lifeTime = 0) |
| 37 | { |
| 38 | return zend_shm_cache_store($id, $data, $lifeTime); |
| 39 | } |
| 40 | /** |
| 41 | * {@inheritdoc} |
| 42 | */ |
| 43 | protected function doDelete($id) |
| 44 | { |
| 45 | return zend_shm_cache_delete($id); |
| 46 | } |
| 47 | /** |
| 48 | * {@inheritdoc} |
| 49 | */ |
| 50 | protected function doFlush() |
| 51 | { |
| 52 | $namespace = $this->getNamespace(); |
| 53 | if (empty($namespace)) { |
| 54 | return zend_shm_cache_clear(); |
| 55 | } |
| 56 | return zend_shm_cache_clear($namespace); |
| 57 | } |
| 58 | /** |
| 59 | * {@inheritdoc} |
| 60 | */ |
| 61 | protected function doGetStats() |
| 62 | { |
| 63 | return null; |
| 64 | } |
| 65 | } |
| 66 |