Download the PHP package andrewsauder/cachesys without Composer

On this page you can find all versions of the php package andrewsauder/cachesys. 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 cachesys

cacheSys

Simple PHP caching system for raw data or rendered output.


Installing

Composer is the preferred installation method. https://packagist.org/packages/andrewsauder/cachesys

composer require andrewsauder/cachesys

Useage

All of the samples below will assume that you add a use statement inside of your namespace referencing cacheSys.

<?php
namespace MyVendorNamespace;
use andrewsauder;

If you opt not to add a use statement, you must reference the cacheSys methods by it's fully qualified class name. Ie:

\andrewsauder\cacheSys::get( 'cacheName', 'cacheKey' );

Retrieving and Create Cache

This is the core useage of cacheSys. I like to think of it as a wrapper for any complex logic that slows requests down.

$employee = cacheSys::get( 'employees', 712 );

if( $employee===false ) {
    //do heavy lifting to create $employee
    $employee = 'Andrew';
    cacheSys::put( 'employees', 712, $employee );
}

var_dump( $employee );

Of course, you always need to make sure that your cached data remains relevant. To do this you can make use of the max age parameter of the get method

/* get the cached copy of employee 712
 * but return false if the cache was created
 * more than 86,400 seconds (24 hours) ago
 */
$employee = cacheSys::get( 'employees', 712, 86400 );

Delete Cached Item

You can also delete a specific cached item on demand.

cacheSys::deleteCachedItem( 'employees', 712 );

Delete Cache Category

Or delete an entire cache category. For example, if you wanted to delete all employees instead of just one, you can delete the entire category instead

cacheSys::deleteCachedCategory( 'employees');

All versions of cachesys with dependencies

PHP Build Version
Package Version
Requires php Version ^5.4 || ^7.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 andrewsauder/cachesys contains the following files

Loading the files please wait ....