Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php final class PhabricatorCacheTTLGarbageCollector extends PhabricatorGarbageCollect..

Decoded Output download

<?php

final class PhabricatorCacheTTLGarbageCollector
  extends PhabricatorGarbageCollector {

  const COLLECTORCONST = 'cache.general.ttl';

  public function getCollectorName() {
    return pht('General Cache (TTL)');
  }

  public function hasAutomaticPolicy() {
    return true;
  }

  protected function collectGarbage() {
    $cache = new PhabricatorKeyValueDatabaseCache();
    $conn_w = $cache->establishConnection('w');

    queryfx(
      $conn_w,
      'DELETE FROM %T WHERE cacheExpires < %d
        ORDER BY cacheExpires ASC LIMIT 100',
      $cache->getTableName(),
      PhabricatorTime::getNow());

    return ($conn_w->getAffectedRows() == 100);
  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

final class PhabricatorCacheTTLGarbageCollector
  extends PhabricatorGarbageCollector {

  const COLLECTORCONST = 'cache.general.ttl';

  public function getCollectorName() {
    return pht('General Cache (TTL)');
  }

  public function hasAutomaticPolicy() {
    return true;
  }

  protected function collectGarbage() {
    $cache = new PhabricatorKeyValueDatabaseCache();
    $conn_w = $cache->establishConnection('w');

    queryfx(
      $conn_w,
      'DELETE FROM %T WHERE cacheExpires < %d
        ORDER BY cacheExpires ASC LIMIT 100',
      $cache->getTableName(),
      PhabricatorTime::getNow());

    return ($conn_w->getAffectedRows() == 100);
  }

}

Function Calls

None

Variables

None

Stats

MD5 2d87e0ab6eb9052408ca5460d190d89c
Eval Count 0
Decode Time 94 ms