Download the PHP package corollarium/cachearium without Composer

On this page you can find all versions of the php package corollarium/cachearium. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cachearium

Build Status Code Coverage Latest Stable Version Latest Unstable Version License

Cachearium

High level cache in your PHP applications. What, another one? Nope, this one is better. Fast, simple and with easy invalidation. Includes:

Cachearium was developed by Corollarium because we needed a great cache system.

Installation

Composer

Add this to your composer.json: see packagist

If you prefer the cutting edge version, with only the freshest bugs:

Manual

No composer? No fret!

Debug and profile

Live cache probes

Cachearium cache debug probes

Image showing cache debug probes. Pink areas are not cached. Green areas are cached. Note that they are nested. The red squares show the dialog with information about each cache hit/miss so you can easily see the cache key, which backend was used and other relevant information.

Probes are only available when you call start()/end().

To see a detailed log

Use cases/examples

See the example/ directory, because it's all there for you. Really, just point a webserver there and play.

Store a single value and invalidate it

This is basic storage.

Store using CacheData

CacheData provides a more sophisticated class to store values.

Store a value with multiple dependencies

You can have multiple dependencies so you can invalidate all cache data that relate to a certain key.

Example: Store searches and invalidate them when an attribute is written to

Cache associated with an object/model that you can easily clean

It's likely that you have a MVC application. Model classes can easily cache data

Nested cache for contents. Useful for generating HTML made of fragments

This uses the russian doll approach to bubble up any invalidations. This means that if you have a list of items and you change one of them, you only invalidate its own cache entry and the entry for the whole list. You can regenerate the list with a single DB hit.

Cache with a variable fragment

This is how to handle something such as a site header, that is almost completely the same except for a small part that varies for each user.

Always add something specific to the cache keys

Let's say for example you have a multi-language website. Caching fragments will always need to add the language as part of the key. Cachearium provides a simple way to do this by creating a special function:

This will be added automatically to your keys in every call to start(). If you need to override this for a single call, use recursiveStart() instead.

Cleaning the house

You can clear the entire cache with $cache->clear() or CacheAbstract::clearAll().

Backends

Null

Does nothing. You can use it to turn off your caches for tests without changing any code calls.

RAM

Caches in RAM, for the duration of the request only. Useful for quick caches that should not persist between requests.

Memcache

Uses Memcache as a backend, and stores data in RAM temporarily to avoid repeated requests in the same run.

Filesystem

Stores in the filesystem.


All versions of cachearium with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package corollarium/cachearium contains the following files

Loading the files please wait ....