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 |
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\ShmopCacheEngine](docs/class-shmop-cache-engine.md) (deprecated) | uses the shared memory area for cache. Use TmpfsCacheEngine. |
41
-
42
-
43
-
## Logging cache commands
44
-
45
-
You can add a PSR Log compatible to the constructor in order to get Log of the operations
46
-
47
-
See log examples [here](docs/setup-log-handler.md)
9
+
A powerful, versatile cache implementation providing both PSR-6 and PSR-16 interfaces with support for multiple storage drivers.
48
10
49
-
## Use a PSR-11 container to retrieve the cache keys
11
+
## Key Features
50
12
51
-
You can use a PSR-11 compatible to retrieve the cache keys.
13
+
-**PSR-16 Simple Cache interface** - Simple, straightforward caching API
14
+
-**PSR-6 Cache Pool interface** - More verbose caching with fine-grained control
15
+
-**Multiple storage backends** - Choose from memory, file system, Redis, Memcached and more
16
+
-**Atomic operations** - Support for increment, decrement and add operations in compatible engines
17
+
-**Garbage collection** - Automatic cleanup of expired items
18
+
-**PSR-11 container support** - Retrieve cache keys via dependency container
19
+
-**Logging capabilities** - PSR-3 compatible logging of cache operations
52
20
53
-
See more [here](docs/psr11-usage.md)
21
+
## Quick Start
54
22
55
-
## Beyond the PSR protocol
56
-
57
-
The PSR protocol is a good way to standardize the cache access,
58
-
but sometimes you need to go beyond the protocol.
23
+
```bash
24
+
composer require "byjg/cache-engine"
25
+
```
59
26
60
-
Some cache engines have additional features that are not covered by the PSR protocol.
27
+
```php
28
+
// PSR-16 Simple Cache
29
+
$cache = new \ByJG\Cache\Psr16\FileSystemCacheEngine();
30
+
$cache->set('key', 'value', 3600); // Cache for 1 hour
0 commit comments