Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/cache/storage/PhabricatorCacheSchemaSpec.php
12242 views
1
<?php
2
3
final class PhabricatorCacheSchemaSpec extends PhabricatorConfigSchemaSpec {
4
5
public function buildSchemata() {
6
$this->buildRawSchema(
7
'cache',
8
id(new PhabricatorKeyValueDatabaseCache())->getTableName(),
9
array(
10
'id' => 'auto64',
11
'cacheKeyHash' => 'bytes12',
12
'cacheKey' => 'text128',
13
'cacheFormat' => 'text16',
14
'cacheData' => 'bytes',
15
'cacheCreated' => 'epoch',
16
'cacheExpires' => 'epoch?',
17
),
18
array(
19
'PRIMARY' => array(
20
'columns' => array('id'),
21
'unique' => true,
22
),
23
'key_cacheKeyHash' => array(
24
'columns' => array('cacheKeyHash'),
25
'unique' => true,
26
),
27
'key_cacheCreated' => array(
28
'columns' => array('cacheCreated'),
29
),
30
'key_ttl' => array(
31
'columns' => array('cacheExpires'),
32
),
33
),
34
array(
35
'persistence' => PhabricatorConfigTableSchema::PERSISTENCE_CACHE,
36
));
37
38
}
39
40
}
41
42