diff --git a/README.md b/README.md new file mode 100644 index 0000000..610109b --- /dev/null +++ b/README.md @@ -0,0 +1,110 @@ +Installation +============ + +This bundle provides a caching mechanism at application level. It's very similar to HTTP caching at reverse-proxy level, but execution +cache is done later. This way, the request has already been checked by the security layer but we can running the controller twice if +the result should be the same. + +The cache storage will provide different result based on Request headers and body. If the exact same request is sent twice and the +response is cached, the controller is not run and the response is sent. + +Step 1: Install the AdapterBundle +--------------------------------- + +This bundle uses a PSR-6 cache implementation provided by https://github.com/php-cache/adapter-bundle. It can be Memcached, Redis, +Filesystem, Void or even your own implementation. The choice is yours! + +Please check their docs before installing this bundle. + +Step 2: Install the Bundle +-------------------------- + +Open a command console, go to your project directory and execute the +following command to download the latest stable version of this bundle: + +```bash +$ composer require stadline/execution-cache-bundle +``` + +This command requires you to have Composer installed globally, as explained +in the [installation chapter](https://getcomposer.org/doc/00-intro.md) +of the Composer documentation. + +Step 3: Enable the Bundle +------------------------- + +Then, enable the bundle by adding the following line in the `app/AppKernel.php` +file of your project: + +```php +