Author: chabotc
Date: Tue Feb 17 12:18:28 2009
New Revision: 744992

URL: http://svn.apache.org/viewvc?rev=744992&view=rev
Log:
Sync up memcache's get with the ttl policy changes

Modified:
    incubator/shindig/trunk/php/src/common/sample/CacheFile.php
    incubator/shindig/trunk/php/src/common/sample/CacheMemcache.php

Modified: incubator/shindig/trunk/php/src/common/sample/CacheFile.php
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/common/sample/CacheFile.php?rev=744992&r1=744991&r2=744992&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/common/sample/CacheFile.php (original)
+++ incubator/shindig/trunk/php/src/common/sample/CacheFile.php Tue Feb 17 
12:18:28 2009
@@ -1,5 +1,4 @@
 <?php
-
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file

Modified: incubator/shindig/trunk/php/src/common/sample/CacheMemcache.php
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/common/sample/CacheMemcache.php?rev=744992&r1=744991&r2=744992&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/common/sample/CacheMemcache.php (original)
+++ incubator/shindig/trunk/php/src/common/sample/CacheMemcache.php Tue Feb 17 
12:18:28 2009
@@ -87,19 +87,11 @@
     }
   }
 
-  public function get($key, $expiration = false) {
+  public function get($key) {
     $this->check();
-    if (! $expiration) {
-      // default to global cache time
-      $expiration = Config::Get('cache_time');
-    }
     if (($ret = @memcache_get(self::$connection, $key)) === false) {
       return false;
     }
-    if (time() - $ret['time'] > $expiration) {
-      $this->delete($key);
-      return false;
-    }
     return $ret['data'];
   }
 


Reply via email to