ratelimitfile: do a clean of the expired entries automatically
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3900 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -55,6 +55,7 @@ class ratelimitfile extends ratelimit
|
|||||||
file_put_contents ($file, $contents);
|
file_put_contents ($file, $contents);
|
||||||
$lock->unlockRW ();
|
$lock->unlockRW ();
|
||||||
unset ($lock);
|
unset ($lock);
|
||||||
|
$this->clean ();
|
||||||
if (count ($contents) > $this->maxEntries)
|
if (count ($contents) > $this->maxEntries)
|
||||||
{
|
{
|
||||||
if ($this->debug) echo "Ratelimiting for '$name'\n";
|
if ($this->debug) echo "Ratelimiting for '$name'\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user