PHPackages                             codeliter/cacheadapter - 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. codeliter/cacheadapter

ActiveProject[Caching](/categories/caching)

codeliter/cacheadapter
======================

An adapter for using the Nette Caching Component

1.3.3(7y ago)046MITPHPPHP &gt;=5.6.0

Since Aug 5Pushed 7y ago1 watchersCompare

[ Source](https://github.com/codeliter/cacheadapter)[ Packagist](https://packagist.org/packages/codeliter/cacheadapter)[ RSS](/packages/codeliter-cacheadapter/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (6)Dependencies (2)Versions (11)Used By (0)

CacheAdapter
============

[](#cacheadapter)

This library does not implement any functionality on its own it is written to help communicate better with the Nettecache library. It is only an adapter that streamlines caching using memcached or file storage.

Requirements
============

[](#requirements)

- Php &gt;= 5.4
- Composer
- Php Memcached extension(Optional)

Installation
============

[](#installation)

- Open your default terminal program
- Change your working directory to the project directory you wish to use this library in.

    You can run the following the command on mac/linux.

    ```
    cd /var/www/html/

    ```

     is where your project lives in
- Run the command to import the library

    ```
    composer require codeliter/cacheadapter

    ```
- That's all

Usage
=====

[](#usage)

Using this library can be as easy as:

- Initialize the Cache Library and set the absolute or relative path of where you want the cache to be saved to

    -If your server has Memcached loaded it uses memcached by default.

    ```
      $cache = new Codeliter\CacheAdapter\Cache('./data/cache');

    ```
- You can save anything to Cache like this

    ```
      $cache_name = 'test_cache';
      $data = 'This is the content of the test_case';
      $cache->save($cache_name, $data, '4 Hours');

    ```
- You can get anything from the Cache

    ```
      $cache_name = 'test_cache';
      $data = $cache->get($cache_name);

    ```
- You can delete from Cache

    ```
      $cache_name = 'test_cache';
      $cache->delete($cache_name);

    ```
- A typical use would be

    - Make an API or database request and store it in the cache for as long as the data would not change

        ```
          $cache_name = 'google_home_page';

          try {
              // Check if the data already exists
              $data = $cache->get($cache_name);
          }
          catch (Throwable $t) {
              // If data does not exist
              // Make the API or Database request
              $request = file_get_contents('https://google.com');
              // Store the data to cache for sometime for future requests
              $cache->save($cache_name, $request, '24 Hours');
          }

        ```

Credits
=======

[](#credits)

- [David Grudl](https://davidgrudl.com/)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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 ~64 days

Recently: every ~98 days

Total

10

Last Release

2628d ago

PHP version history (3 changes)v1.0.0PHP &gt;=5.4

1.3PHP &gt;=7.1

1.3.2.1PHP &gt;=5.6.0

### Community

Maintainers

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

---

Top Contributors

[![codeliter](https://avatars.githubusercontent.com/u/20014433?v=4)](https://github.com/codeliter "codeliter (19 commits)")

---

Tags

nettecachingadapter

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/codeliter-cacheadapter/health.svg)

```
[![Health](https://phpackages.com/badges/codeliter-cacheadapter/health.svg)](https://phpackages.com/packages/codeliter-cacheadapter)
```

###  Alternatives

[psr/simple-cache

Common interfaces for simple caching

8.1k727.3M2.1k](/packages/psr-simple-cache)[symfony/cache

Provides extended PSR-6, PSR-16 (and tags) implementations

4.2k348.9M2.5k](/packages/symfony-cache)[react/cache

Async, Promise-based cache interface for ReactPHP

444112.4M40](/packages/react-cache)[tedivm/stash

The place to keep your cache.

9824.8M124](/packages/tedivm-stash)[overblog/dataloader-php

DataLoaderPhp is a generic utility to be used as part of your application's data fetching layer to provide a simplified and consistent API over various remote data sources such as databases or web services via batching and caching.

2124.2M6](/packages/overblog-dataloader-php)[spatie/blink

Cache that expires in the blink of an eye

1685.0M8](/packages/spatie-blink)

PHPackages © 2026

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