You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|[\ByJG\Cache\Psr16\NoCacheEngine](docs/class-no-cache-engine.md)| Do nothing. Use it for disable the cache without change your code |
20
-
|[\ByJG\Cache\Psr16\ArrayCacheEngine](docs/class-array-cache-engine.md)| Local cache only using array. It does not persists between requests |
21
-
|[\ByJG\AnyDataset\NoSql\Cache\KeyValueCacheEngine](https://github.com/byjg/php-anydataset-nosql)| Use S3-Like or ClouflareKV as a store for the cache (other repository) |
22
-
|[\ByJG\Cache\Psr16\FileSystemCacheEngine](docs/class-filesystem-cache-engine.md)| Save the cache result in the local file system |
23
-
|[\ByJG\Cache\Psr16\MemcachedEngine](docs/class-memcached-engine.md)| Uses the Memcached as the cache engine |
24
-
|[\ByJG\Cache\Psr16\RedisCachedEngine](docs/class-redis-cache-engine.md)| uses the Redis as cache |
25
-
|[\ByJG\Cache\Psr16\SessionCachedEngine](docs/class-session-cache-engine.md)| uses the PHP session as cache |
26
-
|[\ByJG\Cache\Psr16\ShmopCachedEngine](docs/class-shmop-cache-engine.md)| uses the shared memory area for cache |
27
-
28
-
To create a new Cache Instance just create the proper cache engine and use it:
29
-
30
-
```php
31
-
<?php
32
-
$cache = new \ByJG\Cache\Psr16\FileSystemCacheEngine();
33
-
34
-
// And use it:
35
-
if ($cache->has('key')) {
36
-
// Do the complex code to get the value to be cached
37
-
$object = callComplexCode();
38
-
39
-
// Save to cache
40
-
$cache->set('key', $object);
41
-
};
42
-
$object = $cache->get('key');
43
-
```
44
-
45
-
See more PSR-16 examples [here](docs/basic-usage-psr16-simplecache.md)
|[\ByJG\Cache\Psr16\NoCacheEngine](docs/class-no-cache-engine.md)| Do nothing. Use it for disable the cache without change your code|
33
+
|[\ByJG\Cache\Psr16\ArrayCacheEngine](docs/class-array-cache-engine.md)| Local cache only using array. It does not persists between requests |
34
+
|[\ByJG\AnyDataset\NoSql\Cache\KeyValueCacheEngine](https://github.com/byjg/php-anydataset-nosql)| Use S3-Like or ClouflareKV as a store for the cache (other repository)|
35
+
|[\ByJG\Cache\Psr16\FileSystemCacheEngine](docs/class-filesystem-cache-engine.md)| Save the cache result in the local file system |
36
+
|[\ByJG\Cache\Psr16\MemcachedEngine](docs/class-memcached-engine.md)| Uses the Memcached as the cache engine |
37
+
|[\ByJG\Cache\Psr16\TmpfsCacheEngine](docs/class-tmpfs-cache-engine.md)| Uses the Tmpfs as the cache engine |
38
+
|[\ByJG\Cache\Psr16\RedisCachedEngine](docs/class-redis-cache-engine.md)| uses the Redis as cache |
39
+
|[\ByJG\Cache\Psr16\SessionCachedEngine](docs/class-session-cache-engine.md)| uses the PHP session as cache |
40
+
|[\ByJG\Cache\Psr16\ShmopCachedEngine](docs/class-shmop-cache-engine.md)| uses the shared memory area for cache |
82
41
83
-
The Common parameters are:
84
-
85
-
- logger: A valid instance that implement the LoggerInterface defined by the PSR/LOG
86
-
- bufferSize: the Buffer of CachePool
87
-
- prefix: A prefix name to compose the KEY physically
88
-
- servers: An array of memcached servers. E.g.: `[ '127.0.0.1:11211' ]`
89
-
- config: Specific setup for shmop. E.g.: `[ 'max-size' => 524288, 'default-permission' => '0700' ]`
90
42
91
43
## Logging cache commands
92
44
@@ -96,25 +48,9 @@ See log examples [here](docs/setup-log-handler.md)
96
48
97
49
## Use a PSR-11 container to retrieve the cache keys
98
50
99
-
You can use a PSR-11 compatible to retrieve the cache keys. Once is defined, only the keys defined
100
-
in the PSR-11 will be used to cache.
101
-
102
-
```php
103
-
<?php
104
-
$fileCache = new \ByJG\Cache\Psr16\FileSystemCacheEngine()
0 commit comments