PHPackages                             emileperron/magic-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. emileperron/magic-cache

ActiveLibrary[Caching](/categories/caching)

emileperron/magic-cache
=======================

An easy to use caching library that uses Symfony's FilesystemAdapter under the hood.

v1.1.2(5y ago)09MITPHPPHP &gt;=7.2.5

Since Sep 30Pushed 5y ago2 watchersCompare

[ Source](https://github.com/EmilePerron/magic-cache)[ Packagist](https://packagist.org/packages/emileperron/magic-cache)[ RSS](/packages/emileperron-magic-cache/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (5)Used By (0)

MagicCache: a simple PHP caching library
========================================

[](#magiccache-a-simple-php-caching-library)

MagicCache is a simple caching library that wraps Symfony's FilesystemAdapter in order to give you the simplest caching experience possible.

If you have a small project that requires caching, or have a large project with very simple caching needs, this library is for you.

The highlight of this library are the `Cache::magicGet()` and `Cache::magicSet()` method, which allow you to save or retrieve data from the cache without having to define unique cache keys yourself. More details on that below.

Getting started
---------------

[](#getting-started)

To get started, simply require the package via Composer:

```
composer require emileperron/magic-cache

```

Once that's done, you can start using the library in your project. Here's a very brief overview of the library's usage and functionalities:

```
