CacheController
公共缓存处理程序
| 自 |
1.7.0 |
|---|---|
| 混合 |
缓存 |
| 注意 |
从 4.0 开始,此类将为抽象类 |
| 包 |
Joomla CMS |
方法
__call
将 CacheController 方法调用代理到 Cache 的魔法方法
__call( name, mixed||string|int arguments) :
| 自 |
1.7.0 |
|---|
参数
- 名称
string函数名称- 参数
array<string|int, mixed>函数的参数数组
响应
混合
__construct
构造函数
__construct(mixed||string|int options) :
| 自 |
1.7.0 |
|---|
参数
- 选项
array<string|int, mixed>选项数组
响应
混合
addIncludePath
添加 Cache 应搜索控制器的目录。您可以传递字符串或目录数组。
addIncludePath(array|string path = '') : mixed||string|int
static 已弃用
| 自 |
1.7.0 |
|---|---|
| 已弃用 |
4.2 将在 6.0 中删除,改用缓存控制器工厂,例如:Factory::getContainer()->get(CacheControllerFactoryInterface::class)->createCacheController($type, $options); |
参数
- 路径
array<string|int, mixed>|string要搜索的路径。
响应
array<string|int, mixed>带有目录元素的数组
getInstance
返回对缓存适配器对象的引用,始终创建它
getInstance( type = 'output', mixed||string|int options = []) : \Joomla\CMS\Cache\CacheController
static 已弃用
| 自 |
1.7.0 |
|---|---|
| 抛出 |
|
| 已弃用 |
4.2 将在 6.0 中删除,改用缓存控制器工厂,例如:Factory::getContainer()->get(CacheControllerFactoryInterface::class)->createCacheController($type, $options); |
参数
- 类型
string要实例化的缓存对象类型;默认值为 output。- 选项
array<string|int, mixed>选项数组
响应
属性
选项
选项数组
| 自 |
1.7.0 |
|---|
类型
array<string|int, mixed>