File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -198,20 +198,11 @@ public function getData($key)
198198 */
199199 public function storeData ($ key , $ data , $ expiration )
200200 {
201- $ store = serialize ( array ('data ' => $ data , 'expiration ' => $ expiration) );
201+ $ store = array ('data ' => $ data , 'expiration ' => $ expiration );
202202 if (is_null ($ expiration )) {
203203 return $ this ->redis ->set ($ this ->makeKeyString ($ key ), $ store );
204- } else {
205- $ ttl = $ expiration - time ();
206-
207- // Prevent us from even passing a negative ttl'd item to redis,
208- // since it will just round up to zero and cache forever.
209- if ($ ttl < 1 ) {
210- return true ;
211- }
212-
213- return $ this ->redis ->setex ($ this ->makeKeyString ($ key ), $ ttl , $ store );
214204 }
205+ return $ this ->redis ->set ($ this ->makeKeyString ($ key ), $ store , array ('EXAT ' => $ expiration ));
215206 }
216207
217208 /**
You can’t perform that action at this time.
0 commit comments