kohana/cache
最新稳定版本:v3.3.6
Composer 安装命令:
composer require kohana/cache
包简介
The official Kohana cache management module
关键字:
README 文档
README
| ver | Stable | Develop |
|---|---|---|
| 3.3.x | ||
| 3.4.x |
The cache library for Kohana 3 provides a simple interface to the most common cache solutions. Developers are free to add their own caching solutions that follow the cache design pattern defined within this module.
Supported cache solutions
Currently this module supports the following cache methods.
- APC
- Memcache
- Memcached-tags (Supports tags)
- SQLite (Supports tags)
- File
- Wincache
Planned support
In the near future, additional support for the following methods will be included.
- Memcached
Introduction to caching
To use caching to the maximum potential, your application should be designed with caching in mind from the outset. In general, the most effective caches contain lots of small collections of data that are the result of expensive computational operations, such as searching through a large data set.
There are many different caching methods available for PHP, from the very basic file based caching to opcode caching in eAccelerator and APC. Caching engines that use physical memory over disk based storage are always faster, however many do not support more advanced features such as tagging.
Using Cache
To use Kohana Cache, download and extract the latest stable release of Kohana Cache from Github. Place the module into your Kohana instances modules folder. Finally enable the module within the application bootstrap within the section entitled modules.
Quick example
The following is a quick example of how to use Kohana Cache. The example is using the SQLite driver.
<?php // Get a Sqlite Cache instance $mycache = Cache::instance('sqlite'); // Create some data $data = array('foo' => 'bar', 'apples' => 'pear', 'BDFL' => 'Shadowhand'); // Save the data to cache, with an id of test_id and a lifetime of 10 minutes $mycache->set('test_id', $data, 600); // Retrieve the data from cache $retrieved_data = $mycache->get('test_id'); // Remove the cache item $mycache->delete('test_id'); // Clear the cache of all stored items $mycache->delete_all(); kohana/cache 适用场景与选型建议
kohana/cache 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 317.33k 次下载、GitHub Stars 达 76, 最近一次更新时间为 2026 年 01 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「framework」 「cache」 「kohana」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 kohana/cache 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 kohana/cache 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 kohana/cache 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PHP Framework HLEB2 is the foundation of the web application. Provides ease of development and application performance.
Geoip and IP integration
Jam Taxonomy
Admin Builder for Kohana, using Jam ORM
Add complex shipping to openbuildings/purchases package
A php port of jnicklas's capybara, and handles Functional / Integration testing
统计信息
- 总下载量: 317.33k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 78
- 点击次数: 40
- 依赖项目数: 9
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2026-01-04