[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/cache/garbagecollector/ -> PhabricatorCacheTTLGarbageCollector.php (source)

   1  <?php
   2  
   3  final class PhabricatorCacheTTLGarbageCollector
   4    extends PhabricatorGarbageCollector {
   5  
   6    public function collectGarbage() {
   7      $cache = new PhabricatorKeyValueDatabaseCache();
   8      $conn_w = $cache->establishConnection('w');
   9  
  10      queryfx(
  11        $conn_w,
  12        'DELETE FROM %T WHERE cacheExpires < %d
  13          ORDER BY cacheExpires ASC LIMIT 100',
  14        $cache->getTableName(),
  15        time());
  16  
  17      return ($conn_w->getAffectedRows() == 100);
  18    }
  19  
  20  }


Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1