PHPackages                             barcodex/kasha-caching - 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. barcodex/kasha-caching

ActiveLibrary[Caching](/categories/caching)

barcodex/kasha-caching
======================

Simple caching library

030PHP

Since Apr 8Pushed 11y ago1 watchersCompare

[ Source](https://github.com/barcodex/kasha-caching)[ Packagist](https://packagist.org/packages/barcodex/kasha-caching)[ RSS](/packages/barcodex-kasha-caching/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

kasha-caching
=============

[](#kasha-caching)

This library is an extremely simple filesystem-based Cache.

While it can be used for simple storage, most probably you will want to extend this functionality. You are welcome to do so.

\## Installation

Install Temple with Composer by adding a requirement into composer.json of your project:

```
{
   "require": {
        "barcodex/kasha-caching": "*"
   }
}
```

or requiring it from the command line:

```
composer require barcodex/kasha-caching:*
```

API
---

[](#api)

Cache class is the only one in the library, and it has fairly few methods with self-explainable names.

Use *get*/*set* methods to cache a value or retrieve the one from the cache (false is returned if nothing is found).

Whenever you want to be sure beforehand whether key exists, use *hasKey* methods.

If you want to delete a key, use *delete* method.

Cache class is a singleton - you always work with the same instance of it while the script runs. To retrieve the instance, use *getInstance* method.

Cache is filesystem based, so it should know the folder where it is initialized into. Use *setRootFolder* when you have got the instance of the object for the first time. At any later point, running *getRootFolder* on the instance variable would return the path.

API does not care about the hierarchy of the keys you want to have, but the Cache class is ready for that. Whenever you specify the key as a string containing slashes, Cache will automatically create the folder structure.

Later you can do some bulk operations with the keys that have the same prefix. So far, there are only two methods - *listKeysByprefix* and *deleteByPrefix*

###  Health Score

20

—

LowBetter than 12% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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://www.gravatar.com/avatar/a43ff3f1b21ae02793a94d2d7d86767bc8b3291bdec0dc498c2948acb2b3b3fc?d=identicon)[barcodex](/maintainers/barcodex)

### Embed Badge

![Health badge](/badges/barcodex-kasha-caching/health.svg)

```
[![Health](https://phpackages.com/badges/barcodex-kasha-caching/health.svg)](https://phpackages.com/packages/barcodex-kasha-caching)
```

###  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)[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)
