gilbitron / Php Simplecache
A simple script for caching 3rd party API calls in PHP
Stars: ✭ 264
Labels
Projects that are alternatives of or similar to Php Simplecache
cache-trace
A collection of Twitter's anonymized production cache traces.
Stars: ✭ 89 (-66.29%)
Mutual labels: cache
moka
A high performance concurrent caching library for Rust
Stars: ✭ 346 (+31.06%)
Mutual labels: cache
gotcha
[Not Safe For Production] gotcha: inmemory-cache in Go (Golang) with customizable algorithm
Stars: ✭ 13 (-95.08%)
Mutual labels: cache
express-view-cache
Unobtrusive solution to express framework - cache rendered page, without database requests and rendering.
Stars: ✭ 20 (-92.42%)
Mutual labels: cache
Grunt Cache Bust
Cache bust static assets using content hashing
Stars: ✭ 262 (-0.76%)
Mutual labels: cache
storage
Go package for abstracting local, in-memory, and remote (Google Cloud Storage/S3) filesystems
Stars: ✭ 49 (-81.44%)
Mutual labels: cache
httpcache
An HTTP server that proxies all requests to other HTTP servers and this servers caches all incoming responses objects
Stars: ✭ 23 (-91.29%)
Mutual labels: cache
rememberable
Laravel Traits for fast integration of model caching
Stars: ✭ 28 (-89.39%)
Mutual labels: cache
codeigniter-cache-helper
📤 A CodeIgniter output cache helper.
Stars: ✭ 19 (-92.8%)
Mutual labels: cache
justreq
A caching proxy server for testing interface of HTTP or HTTPS. A never offline testing interface server. A mock server
Stars: ✭ 15 (-94.32%)
Mutual labels: cache
personJudge
personJudge System 网站预览---->http://47.106.235.227 (账号111,密码12345) 后端:SpringBoot/JPA/mysql/cache/前后端分离(nginx做静态转发)/swagger 前端:bootstrap+Jquery及其插件:jquery-cookie,toastr,steps,validate,wnumb,nouislider,DataTables,layer,chosen,echarts
Stars: ✭ 35 (-86.74%)
Mutual labels: cache
lambda-cache
Python utility for caching in Lambda Functions
Stars: ✭ 28 (-89.39%)
Mutual labels: cache
PHP SimpleCache
The PHP SimpleCache Class is an easy way to cache 3rd party API calls.
Install
Install via composer:
{
"require": {
"gilbitron/php-simplecache": "~1.4"
}
}
Run composer install
then use as normal:
require 'vendor/autoload.php';
$cache = new Gilbitron\Util\SimpleCache();
Usage
A very basic usage example:
$cache = new Gilbitron\Util\SimpleCache();
$latest_tweet = $cache->get_data('tweet', 'http://search.twitter.com/search.atom?q=from:gilbitron&rpp=1');
echo $latest_tweet;
A more advanced example:
$cache = new Gilbitron\Util\SimpleCache();
$cache->cache_path = 'cache/';
$cache->cache_time = 3600;
if($data = $cache->get_cache('label')){
$data = json_decode($data);
} else {
$data = $cache->do_curl('http://some.api.com/file.json');
$cache->set_cache('label', $data);
$data = json_decode($data);
}
print_r($data);
Credits
PHP SimpleCache was created by Gilbert Pellegrom from Dev7studios. Released under the MIT license.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].