[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class DifferentialParseCacheGarbageCollector 4 extends PhabricatorGarbageCollector { 5 6 public function collectGarbage() { 7 $key = 'gcdaemon.ttl.differential-parse-cache'; 8 $ttl = PhabricatorEnv::getEnvConfig($key); 9 if ($ttl <= 0) { 10 return false; 11 } 12 13 $table = new DifferentialChangeset(); 14 $conn_w = $table->establishConnection('w'); 15 16 queryfx( 17 $conn_w, 18 'DELETE FROM %T WHERE dateCreated < %d LIMIT 100', 19 DifferentialChangeset::TABLE_CACHE, 20 time() - $ttl); 21 22 return ($conn_w->getAffectedRows() == 100); 23 } 24 25 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |