2017 © Pedro Peláez
 

library in-cache

Cache wrapper.

image

pavel-u/in-cache

Cache wrapper.

  • Sunday, October 19, 2014
  • by pavel-u
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

InCache

InCache is a simple tool which will going to represent cache as a new level of abstraction via DSL., (*1)

Installing

Composer

The fastest way to install InCache in your project is using Composer., (*2)

  1. Install Composer:, (*3)

    curl -s https://getcomposer.org/installer | php
    
  2. Add InCache as a dependency to your composer.json file:, (*4)

    {
        "require": {
            "pavel-u/in-cache": "dev-master"
        }
    }
    

    Currently project is in the development state. So, "dev-master" version should be used., (*5)

  3. Install InCache:, (*6)

    php composer.phar install
    

Usage

Configure Interceptor

Initialize InCache interceptor: php $interceptor = new \InCache\Interceptor; Set Root path: php $interceptor->setRootPath(__DIR__) Set path to the config file: php $interceptor->setConfigPath(realpath(__DIR__ . DIRECTORY_SEPARATOR . 'etc/cache.xml')) Start to intercept methods calls: php $interceptor->listen() Generate proxy classess. First parameter is used to process force code generation: php $interceptor->generate(true);, (*7)

Add config file

Here is an example of config file ```xml , (*8)

```, (*9)

Cache Driver MUST implements Stash\Interfaces\DriverInterface interface. Cache Pool MUST implements Stash\Interfaces\PoolInterface, (*10)

Also, you could always check XSD file which will provide you more datails about DSL., (*11)

The Versions

19/10 2014