Documentation

ClearCache
in package

Description of ClearCache

Tags
author

zozlak

Table of Contents

Constants

BY_MOD_TIME  = 1
BY_SIZE  = 2

Properties

$dir  : string

Methods

__construct()  : mixed
clean()  : void
Assures caches doesn't exceed a given size.

Constants

Properties

Methods

__construct()

public __construct(string $cacheDir) : mixed
Parameters
$cacheDir : string

clean()

Assures caches doesn't exceed a given size.

public clean(int $maxSizeMb, int $mode) : void
Parameters
$maxSizeMb : int

maximum cache size in MB

$mode : int

which files should be removed first

  • ClearCache::BY_MOD_TIME - oldest
  • ClearCache::BY_SIZE - biggest
Tags
throws
BadMethodCallException

        
On this page

Search results