Download the PHP package snicholson/slimfilecache without Composer

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

Slim File Cache

A file based cache middleware for the slim framework (3.0). The cache is a simple file based cache, I needed something for a very specific situation where I had many external API requests (essentially an API aggregator) to make and within a given time period they always made my routes give the same output. I didn't need a database or anything fancy, and wasn't too fussed about performance. So a file based cache made a lot of sense.

Installation

Installation is done via composer

Requirements

This middleware works with slim 3.0 Release Candidate.

Setup

The middleware conforms to slims normal injection requirements. The example below is the basic setup of the cache. Once this has been implemented, it will automatically load any active cache records for the route currently being called and halt the execution of the application.

Usage

To use the cache you simple need to cache the output of your route before returning it. The add method takes up to 6 arguments, the first one is the route name. The second one is the content, and the third argument is the response code status (e.g. 200) and fourthly is an array of headers to send, the fifth is the duration of the cache in seconds. The default length is 1 hour. The second argument for the cache is the directory to store the cache files in. The directory must be writeable to the web user.

Alternatively you can tell the cache to store all routes called by simple placing the following line after you have run the slim app

The cache has a few other simple methods. They are flush, get, remove. They essentially do what they say on the tin:


All versions of slimfilecache with dependencies

PHP Build Version
Package Version
Requires slim/slim Version ^3.0@RC
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 snicholson/slimfilecache contains the following files

Loading the files please wait ....