PHPackages                             evaengine/eva-cache - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. evaengine/eva-cache

AbandonedArchivedLibrary[Caching](/categories/caching)

evaengine/eva-cache
===================

Cache Module of EvaEngine

102PHP

Since Apr 23Pushed 10y ago3 watchersCompare

[ Source](https://github.com/EvaEngine/EvaCache)[ Packagist](https://packagist.org/packages/evaengine/eva-cache)[ RSS](/packages/evaengine-eva-cache/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

EvaCache
========

[](#evacache)

通用缓存模块，目前实现了 HTTPRequest 的缓存。

HTTPRequest/CacheService
------------------------

[](#httprequestcacheservice)

本缓存服务对 [phalcon/incubator](https://packagist.org/packages/phalcon/incubator) 进行了二次封装，可以在尽可能少地修改原来的代码 的情况下对 curl 操作加上缓存。

示例代码：

```
use Eva\EvaCache\CacheManager;

$cacheManager = new CacheManager($this->getDI()->getGlobalCache());
$quotes = $cacheManager->http(
    function (ProviderInterface $provider) use ($self) {
        $provider->setBaseUri('http://api.markets.wallstreetcn.com/v1/');
        try {
            $response = $provider->get('quotes.json');
        } catch (\Exception $e) {
            return array();
        }
        if ($response->header->statusCode != 200) {
            return array();
        }
        return json_decode($response->body);
    },
    120 // 缓存有效期，单位是秒
);
if (!$quotes) {
    return $this->view->setVar('quotes', array());
}
$quotes = $quotes->results;
```

以下是使用 HTTPRequest/CacheService 之前的代码：

```
$quotes = array();
$provider  = Request::getProvider();
$provider->setBaseUri('http://api.markets.wallstreetcn.com/v1/');
try {
    $response = $provider->get('quotes.json');
} catch (\Exception $e) {
    return $this->view->setVar('quotes', array());
}
if($response->header->statusCode != 200) {
    return $this->view->setVar('quotes', array());
}
$quotes = json_decode($response->body);
$quotes = $quotes->results;
```

###  Health Score

20

—

LowBetter than 12% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/176019?v=4)[AlloVince](/maintainers/AlloVince)[@AlloVince](https://github.com/AlloVince)

---

Top Contributors

[![mr5](https://avatars.githubusercontent.com/u/3281595?v=4)](https://github.com/mr5 "mr5 (14 commits)")

### Embed Badge

![Health badge](/badges/evaengine-eva-cache/health.svg)

```
[![Health](https://phpackages.com/badges/evaengine-eva-cache/health.svg)](https://phpackages.com/packages/evaengine-eva-cache)
```

###  Alternatives

[iazaran/smart-cache

Smart Cache is a caching optimization package designed to enhance the way your Laravel application handles data caching. It intelligently manages large data sets by compressing, chunking, or applying other optimization strategies to keep your application performant and efficient.

21114.2k](/packages/iazaran-smart-cache)[phpfastcache/phpssdb

PHP SSDB Driver for phpFastCache

14736.9k1](/packages/phpfastcache-phpssdb)[rapidwebltd/rw-file-cache

RW File Cache is a PHP File-based Caching Library. Its syntax is designed to closely resemble the PHP memcache extension.

15196.8k7](/packages/rapidwebltd-rw-file-cache)[yuzuru-s/redis-recommend

Wrapping Redis's sorted set APIs for specializing recommending operations.

392.9k](/packages/yuzuru-s-redis-recommend)[ichhabrecht/intcache

Turn uncachable page objects into cacheable links

193.9k](/packages/ichhabrecht-intcache)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
