PHPackages                             urbanindo/yii2-s3cache - 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. urbanindo/yii2-s3cache

ActiveLibrary[Caching](/categories/caching)

urbanindo/yii2-s3cache
======================

Yii2 Component for Caching in S3

1.1.0(8y ago)218.0k3[1 PRs](https://github.com/urbanindo/yii2-s3cache/pulls)MITPHPPHP &gt;=5.5.0

Since Feb 25Pushed 8y ago5 watchersCompare

[ Source](https://github.com/urbanindo/yii2-s3cache)[ Packagist](https://packagist.org/packages/urbanindo/yii2-s3cache)[ RSS](/packages/urbanindo-yii2-s3cache/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (4)Used By (0)

yii2-s3cache
============

[](#yii2-s3cache)

File caching component for Yii2 using AWS Simple Storage Service

[![Latest Stable Version](https://camo.githubusercontent.com/cdbbbd9a0beeee0f9716fb812338b2ece0c3f055b88cc63dc171cef0cdd0857b/68747470733a2f2f706f7365722e707567782e6f72672f757262616e696e646f2f796969322d733363616368652f762f737461626c652e737667)](https://packagist.org/packages/urbanindo/yii2-s3cache)[![Total Downloads](https://camo.githubusercontent.com/f700ee5bc715ced03e8a3903a4a02b3032041d2c2285b1eef4a073b02fde0a7a/68747470733a2f2f706f7365722e707567782e6f72672f757262616e696e646f2f796969322d733363616368652f646f776e6c6f6164732e737667)](https://packagist.org/packages/urbanindo/yii2-s3cache)[![Latest Unstable Version](https://camo.githubusercontent.com/ca29e561976b4e959fdb1c35b7231c8da98775ec27f8274341c5a9bb8f40f81b/68747470733a2f2f706f7365722e707567782e6f72672f757262616e696e646f2f796969322d733363616368652f762f756e737461626c652e737667)](https://packagist.org/packages/urbanindo/yii2-s3cache)

This is intended for large and long-lived objects.

Requirement
-----------

[](#requirement)

- PHP &gt;= 5.5
- AWS SDK &gt;= 3.28.0

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist urbanindo/yii2-s3cache "*"

```

or add

```
"urbanindo/yii2-s3cache": "*"

```

to the require section of your `composer.json` file.

Setting Up
----------

[](#setting-up)

Add the component in the configuration.

```
'components' => [
    's3Cache' => [
        'class' => 'UrbanIndo\Yii2\S3Cache\Cache',
        'bucket' => 'mybucket',
        'cachePrefix' => '123456',
        'config' => [
            'key' => 'AKIA1234567890123456',
            'secret' => '1234567890123456789012345678901234567890',
            'region' => 'ap-southeast-1',
        ],
    ]
]
```

Usage
-----

[](#usage)

This is similar like regular [data caching](http://www.yiiframework.com/doc-2.0/guide-caching-data.html).

```
$cache = Yii::$app->get('s3Cache');
// try retrieving $data from cache
$data = $cache->get($key);

if ($data === false) {

    // $data is not found in cache, calculate it from scratch

    // store $data in cache so that it can be retrieved next time
    $cache->set($key, $data);
}

// $data is available here
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 75% 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 ~825 days

Total

2

Last Release

3269d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1b7f55dc6d59ee54e7f73ffc96ab51bac7e1e328894ad74998dc55df0df8433c?d=identicon)[urbanindo](/maintainers/urbanindo)

![](https://www.gravatar.com/avatar/c1261f29f95a5ca228a04c8415431baf0fb6c397ec83e93e3454fb0b55718c5e?d=identicon)[petrabarus](/maintainers/petrabarus)

---

Top Contributors

[![petrabarus](https://avatars.githubusercontent.com/u/523289?v=4)](https://github.com/petrabarus "petrabarus (6 commits)")[![setyolegowo](https://avatars.githubusercontent.com/u/3380239?v=4)](https://github.com/setyolegowo "setyolegowo (2 commits)")

### Embed Badge

![Health badge](/badges/urbanindo-yii2-s3cache/health.svg)

```
[![Health](https://phpackages.com/badges/urbanindo-yii2-s3cache/health.svg)](https://phpackages.com/packages/urbanindo-yii2-s3cache)
```

PHPackages © 2026

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