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 PhabricatorCacheGeneralGarbageCollector extends PhabricatorGarbageCol..

Decoded Output download

<?php

final class PhabricatorCacheGeneralGarbageCollector
  extends PhabricatorGarbageCollector {

  const COLLECTORCONST = 'cache.general';

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

  public function getDefaultRetentionPolicy() {
    return phutil_units('30 days in seconds');
  }

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

    queryfx(
      $conn_w,
      'DELETE FROM %T WHERE cacheCreated < %d
        ORDER BY cacheCreated ASC LIMIT 100',
      $cache->getTableName(),
      $this->getGarbageEpoch());

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

}
 ?>

Did this file decode correctly?

Original Code

<?php

final class PhabricatorCacheGeneralGarbageCollector
  extends PhabricatorGarbageCollector {

  const COLLECTORCONST = 'cache.general';

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

  public function getDefaultRetentionPolicy() {
    return phutil_units('30 days in seconds');
  }

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

    queryfx(
      $conn_w,
      'DELETE FROM %T WHERE cacheCreated < %d
        ORDER BY cacheCreated ASC LIMIT 100',
      $cache->getTableName(),
      $this->getGarbageEpoch());

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

}

Function Calls

None

Variables

None

Stats

MD5 3ff007b79a54d176635fc4dd602d061d
Eval Count 0
Decode Time 90 ms