File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
src/phpFastCache/Drivers/Sqlite Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -308,20 +308,18 @@ protected function driverRead(CacheItemInterface $item)
308308 {
309309 try {
310310 $ stm = $ this ->getDb ($ item ->getKey ())
311- ->prepare ("SELECT * FROM `caching` WHERE `keyword`=:keyword AND (`exp` >= :U) LIMIT 1 " );
311+ ->prepare ("SELECT * FROM `caching` WHERE `keyword`=:keyword LIMIT 1 " );
312312 $ stm ->execute ([
313313 ':keyword ' => $ item ->getKey (),
314- ':U ' => time (),
315314 ]);
316315 $ row = $ stm ->fetch (PDO ::FETCH_ASSOC );
317316
318317 } catch (PDOException $ e ) {
319318 try {
320319 $ stm = $ this ->getDb ($ item ->getKey (), true )
321- ->prepare ("SELECT * FROM `caching` WHERE `keyword`=:keyword AND (`exp` >= :U) LIMIT 1 " );
320+ ->prepare ("SELECT * FROM `caching` WHERE `keyword`=:keyword LIMIT 1 " );
322321 $ stm ->execute ([
323322 ':keyword ' => $ item ->getKey (),
324- ':U ' => time (),
325323 ]);
326324 $ row = $ stm ->fetch (PDO ::FETCH_ASSOC );
327325 } catch (PDOException $ e ) {
@@ -349,11 +347,9 @@ protected function driverDelete(CacheItemInterface $item)
349347 if ($ item instanceof Item) {
350348 try {
351349 $ stm = $ this ->getDb ($ item ->getKey ())
352- //->prepare("DELETE FROM `caching` WHERE (`id`=:id) OR (`exp` <= :U) ");
353350 ->prepare ("DELETE FROM `caching` WHERE (`exp` <= :U) OR (`keyword`=:keyword) " );
354351
355352 return $ stm ->execute ([
356- // ':id' => $row[ 'id' ],
357353 ':keyword ' => $ item ->getKey (),
358354 ':U ' => time (),
359355 ]);
You can’t perform that action at this time.
0 commit comments