-
Notifications
You must be signed in to change notification settings - Fork 13
/
APC.php
executable file
·47 lines (40 loc) · 1.01 KB
/
APC.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
/**
* Webiny Framework (http://www.webiny.com/framework)
*
* @copyright Copyright Webiny LTD
*/
namespace Webiny\Component\Cache\Bridge;
use Webiny\Component\Cache\Cache;
/**
* APC cache bridge loader.
*
* @package Webiny\Component\Cache\Bridge
*/
class APC extends AbstractCache
{
/**
* Path to the default bridge library for APC.
*
* @var string
*/
private static $library = '\Webiny\Component\Cache\Bridge\Memory\APC';
/**
* Get the name of bridge library which will be used as the driver.
*
* @return string
*/
public static function getLibrary()
{
return Cache::getConfig()->get('Bridges.Apc', self::$library);
}
/**
* Change the default library used for the driver.
*
* @param string $pathToClass Path to the new driver class. Must be an instance of \Webiny\Component\Cache\Bridge\CacheInterface
*/
public static function setLibrary($pathToClass)
{
self::$library = $pathToClass;
}
}