[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/config/option/ -> PhabricatorGarbageCollectorConfigOptions.php (source)

   1  <?php
   2  
   3  final class PhabricatorGarbageCollectorConfigOptions
   4    extends PhabricatorApplicationConfigOptions {
   5  
   6    public function getName() {
   7      return pht('Garbage Collector');
   8    }
   9  
  10    public function getDescription() {
  11      return pht('Configure the GC for old logs, caches, etc.');
  12    }
  13  
  14    public function getOptions() {
  15  
  16      $options = array(
  17        'gcdaemon.ttl.herald-transcripts' => array(
  18          30,
  19          pht('Number of seconds to retain Herald transcripts for.'),
  20        ),
  21        'gcdaemon.ttl.daemon-logs' => array(
  22          7,
  23          pht('Number of seconds to retain Daemon logs for.'),
  24        ),
  25        'gcdaemon.ttl.differential-parse-cache' => array(
  26          14,
  27          pht('Number of seconds to retain Differential parse caches for.'),
  28        ),
  29        'gcdaemon.ttl.markup-cache' => array(
  30          30,
  31          pht('Number of seconds to retain Markup cache entries for.'),
  32        ),
  33        'gcdaemon.ttl.task-archive' => array(
  34          14,
  35          pht('Number of seconds to retain archived background tasks for.'),
  36        ),
  37        'gcdaemon.ttl.general-cache' => array(
  38          30,
  39          pht('Number of seconds to retain general cache entries for.'),
  40        ),
  41        'gcdaemon.ttl.conduit-logs' => array(
  42          180,
  43          pht('Number of seconds to retain Conduit call logs for.'),
  44        ),
  45      );
  46  
  47      $result = array();
  48      foreach ($options as $key => $spec) {
  49        list($default_days, $description) = $spec;
  50        $result[] = $this
  51          ->newOption($key, 'int', $default_days * (24 * 60 * 60))
  52          ->setDescription($description)
  53          ->addExample((7 * 24 * 60 * 60), pht('Retain for 1 week'))
  54          ->addExample((14 * 24 * 60 * 60), pht('Retain for 2 weeks'))
  55          ->addExample((30 * 24 * 60 * 60), pht('Retain for 30 days'))
  56          ->addExample((60 * 24 * 60 * 60), pht('Retain for 60 days'))
  57          ->addExample(0, pht('Retain indefinitely'));
  58      }
  59      return $result;
  60    }
  61  
  62  }


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