@@ -3,8 +3,8 @@ Koded - Simple Caching Library
33
44[ ![ Latest Stable Version] ( https://img.shields.io/packagist/v/koded/cache-simple.svg )] ( https://packagist.org/packages/koded/cache-simple )
55[ ![ Build Status] ( https://travis-ci.org/kodedphp/cache-simple.svg?branch=master )] ( https://travis-ci.org/kodedphp/cache-simple )
6- [ ![ Codacy Badge ] ( https://api.codacy. com/project/badge/Coverage/1b3bad367cc74a3fa98996c252cdfe6f )] ( https://www.codacy. com/app/kodeart /cache-simple )
7- [ ![ Codacy Badge ] ( https://api.codacy. com/project/badge/Grade/1b3bad367cc74a3fa98996c252cdfe6f )] ( https://www.codacy. com/app/kodeart /cache-simple )
6+ [ ![ Code Coverage ] ( https://scrutinizer-ci. com/g/kodedphp/cache-simple/badges/coverage.png?b=master )] ( https://scrutinizer-ci. com/g/kodedphp /cache-simple/?branch=master )
7+ [ ![ Scrutinizer Code Quality ] ( https://scrutinizer-ci. com/g/kodedphp/cache-simple/badges/quality-score.png?b=master )] ( https://scrutinizer-ci. com/g/kodedphp /cache-simple/?branch=master )
88[ ![ Packagist Downloads] ( https://img.shields.io/packagist/dt/koded/cache-simple.svg )] ( https://packagist.org/packages/koded/cache-simple )
99[ ![ Minimum PHP Version] ( https://img.shields.io/badge/php-%3E%3D%207.2-8892BF.svg )] ( https://php.net/ )
1010[ ![ Software license] ( https://img.shields.io/badge/License-BSD%203--Clause-blue.svg )] ( LICENSE )
@@ -160,6 +160,7 @@ $cache = simple_cache_factory('redis', [
160160| id | string | no | Memcached persistent_id value |
161161| servers | array | no | A list of nested array with \[ server, port\] values |
162162| options | array | no | A list of Memcached options |
163+ | ttl | int | no | Global TTL (in seconds) |
163164
164165The following options are set ** by default** when instance of ` MemcachedConfiguration ` is created,
165166except for ` OPT_PREFIX_KEY ` which is there as a reminder that it may be set
@@ -198,7 +199,10 @@ Examples:
198199 \Memcached::OPT_PREFIX_KEY => 'i:', // item prefix
199200 \Memcached::OPT_REMOVE_FAILED_SERVERS => false, // change the default value
200201 \Memcached::OPT_DISTRIBUTION => null // remove this directive
201- ]
202+ ],
203+
204+ // the global expiration time (for ALL cached items)
205+ 'ttl' => 120,
202206]
203207```
204208
0 commit comments