Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F547532
DifferentialParseCacheGarbageCollector.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
682 B
Referenced Files
None
Subscribers
None
DifferentialParseCacheGarbageCollector.php
View Options
<?php
final
class
DifferentialParseCacheGarbageCollector
extends
PhabricatorGarbageCollector
{
const
COLLECTORCONST
=
'differential.parse'
;
public
function
getCollectorName
()
{
return
pht
(
'Differential Parse Cache'
);
}
public
function
getDefaultRetentionPolicy
()
{
return
phutil_units
(
'14 days in seconds'
);
}
protected
function
collectGarbage
()
{
$table
=
new
DifferentialChangeset
();
$conn_w
=
$table
->
establishConnection
(
'w'
);
queryfx
(
$conn_w
,
'DELETE FROM %T WHERE dateCreated < %d LIMIT 100'
,
DifferentialChangeset
::
TABLE_CACHE
,
$this
->
getGarbageEpoch
());
return
(
$conn_w
->
getAffectedRows
()
==
100
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 1:34 PM (1 d, 23 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
118571
Default Alt Text
DifferentialParseCacheGarbageCollector.php (682 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment