php - Setting cache timeout to a key in Codeigniter using predis package -


in codeigniter, i've installed predis package using composer. i'm able set , value cache using package. requirement need keep value in cache using redis 1 min. have seen different options setting through redis terminal. need set time limit in controller itself. idea ?

just use expire through predis:

$client = new predis\client(); $client->set('foo', 'bar'); $client->expire('foo', 60); 

Comments

Popular posts from this blog

android - net_scheduler holding wakelock -

sql - MySQL : Getting Entries from a many-to-many table -

java - Retrieving data from database using jsp (Hibernate + Spring + Maven) -