PHPackages                             kylin987/webman-thinkorm-redis-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. kylin987/webman-thinkorm-redis-cache

ActiveLibrary

kylin987/webman-thinkorm-redis-cache
====================================

适用于webman下基于think-orm和redis开发的跨项目共享cache

v1.2.6(1y ago)0165↓100%MITPHPPHP &gt;=7.4

Since Apr 12Pushed 1y ago1 watchersCompare

[ Source](https://github.com/kylin987/webman-thinkorm-redis-cache)[ Packagist](https://packagist.org/packages/kylin987/webman-thinkorm-redis-cache)[ RSS](/packages/kylin987-webman-thinkorm-redis-cache/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (14)Used By (0)

基于webman的跨项目共享数据缓存的composer包
============================

[](#基于webman的跨项目共享数据缓存的composer包)

此包仅适用于webman框架+thinkorm使用，同时提供适用于thinkphp6的包[点这里](https://github.com/kylin987/think-orm-redis-cache)

安装
--

[](#安装)

```
composer require kylin987/webman-thinkorm-redis-cache

```

使用
--

[](#使用)

### 1、引入：

[](#1引入)

```
参考test/model/User.php和Mini.php文件

```

### 2、配置：

[](#2配置)

```

1、修改config/thinkorm.php，添加以下3个配置

//数据库缓存store
'cache_store'       => 'ormCache',
//缓存时间
'cache_exptime' => 172800,
//空数据是否仍然缓存
'cache_always' => true,

2、修改config/redis.php，增加一个缓存store，名字ormCache和上面的配置保持一致，下面的配置根据需求自行配置

// ormredis缓存
'ormCache' => [
    'host' => '127.0.0.1',
    'password' => '123456',
    'port' => 6379,
    'database' => 5,
],

3、添加启动项文件，把test文件夹下的boot文件夹复制到webman根目录下的support文件夹内
4、config/bootstrap.php中的数组增加一行\support\boot\ThinkOrm::class

```

### 2、使用：

[](#2使用)

```
//获取数据
$id = 10;
$user = User::getRedisCache($id);

//更新数据
//正常使用模型更新数据即可，也可以手动清理缓存触发后续的更新缓存
$id = 10;
$user = User::getRedisCache($id);
User::delCache($user);

```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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.

###  Release Activity

Cadence

Every ~46 days

Recently: every ~86 days

Total

13

Last Release

569d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7f1c0726daff91d74835f3ef3901923fdf7b6b0b65d919968682b53edd22c9cc?d=identicon)[kylin987](/maintainers/kylin987)

---

Top Contributors

[![kylin987](https://avatars.githubusercontent.com/u/26080774?v=4)](https://github.com/kylin987 "kylin987 (16 commits)")

### Embed Badge

![Health badge](/badges/kylin987-webman-thinkorm-redis-cache/health.svg)

```
[![Health](https://phpackages.com/badges/kylin987-webman-thinkorm-redis-cache/health.svg)](https://phpackages.com/packages/kylin987-webman-thinkorm-redis-cache)
```

###  Alternatives

[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M151](/packages/sulu-sulu)[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)[thecodingmachine/graphqlite

Write your GraphQL queries in simple to write controllers (using webonyx/graphql-php).

5723.1M30](/packages/thecodingmachine-graphqlite)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[tempest/framework

The PHP framework that gets out of your way.

2.1k23.1k9](/packages/tempest-framework)[api-platform/state

API Platform state interfaces

223.4M57](/packages/api-platform-state)

PHPackages © 2026

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