dev-master
9999999-devdata broker
The Requires
- php >=5.4
The Development Requires
- mikey179/vfsstream >=1.1.0
- phpunit/phpunit 3.7.*
Wallogit.com
2017 © Pedro Peláez
data broker
Databroker helps application to be more elastic e.g. you can easily turn on/off caching for various data fetch (database queries, rest and soap calls, file fetch, ...). It implements plugin architecture so it is easy to extend databroker with additional functionality (cache, monitor, ...)., (*1)
$ git clone git://github.com/hergot/databroker.git && cd databroker, (*2)
$ curl -s https://getcomposer.org/installer | php, (*3)
$ ./composer.phar install --dev, (*4)
$ ln -nfs ./vendor/phpunit/phpunit/composer/bin/phpunit ./phpunit, (*5)
$ ./phpunit -c ., (*7)
$ ./phpunit --coverage-html <folder path e.g. /tmp/coverage> -c ., (*8)
You have to enable apc for cli - apc.enable_cli=1 in php.ini file or run phpunit with --exclude-group apc, (*9)
$ ./phpunit --exclude-group apc -c ., (*10)
This plugin cache data fetch into cache backends (APC, file, ...). This plugin have to be configured via setup method - this method expects name or mask of data fetch call. Mask can contain asterix * as wild character., (*11)
$cachePlugin->setup('*')
->setCacheable(true)
->setLifeTime(60)
->setRefreshTime(10)
->setBackend($cacheBackend);, (*12)
This means to cache all (* - mask) data fetch for 60 seconds. Every 10 seconds refresh content in cache backend. Use $cacheBackend as cache backend., (*13)
data broker