djgadd / themosis-cache
Themosis 的 illuminate/cache 包由 WP_Object_Cache 支持。
Requires
- php: >=7.0
- composer/installers: ~1.2
- djgadd/themosis-illuminate: ^1.0
- illuminate/cache: ^5.4
- themosis/framework: ^1.3
This package is auto-updated.
Last update: 2021-10-15 21:20:29 UTC
README
这是一个为 Themosis 框架实现的包,使用 WP_Object_Cache 支持的驱动实现 illuminate/cache
。需要设置 keltiecochrane/themosis-illuminate
的 ConfigServiceProvider。
安装
通过 composer 安装:- composer require keltiecochrane/themosis-cache
将 config/cache.config.php
复制到您的 theme/resources/config
目录,并根据需要进行配置。
在您的 theme/resources/config/providers.php
文件中注册服务提供者:- KeltieCochrane\Cache\CacheServiceProvider::class,
可选地,在您的 theme/resources/config/theme.php
文件中注册别名:- 'Cache' => KeltieCochrane\Cache\CacheFacade::class,
请注意,它使用 WP_Object_Cache,因此您需要安装一个对象缓存插件(例如 https://wordpresstheme.cn/plugins/redis-cache/)。
示例
Cache::get('some-cache-key');
有关更多信息,请参阅 Laravel 文档。
助手
以下(额外的)助手可用:-
- cache
有关更多信息,请参阅 Laravel 文档。
支持
此插件按原样提供,尽管我们会尽力提供帮助。
贡献
任何贡献都将受到鼓励并被高度赞赏,您可以通过以下方式做出贡献:
- 报告错误
- 建议功能
- 发送拉取请求