GithubHelp home page GithubHelp logo

up1 / codeigniter-cache Goto Github PK

View Code? Open in Web Editor NEW

This project forked from benedmunds/codeigniter-cache

1.0 3.0 1.0 84 KB

A cache library for CodeIgniter that can cache by library call, model call or just custom data via get/write methods.

codeigniter-cache's Introduction

CodeIgniter-Cache

CodeIgniter-Cache is a partial caching library for CodeIgniter. It allows you to write and get chunks of data to and from the filesystem. By storing complex or large chunks of data in serialized form on the file system you can relieve stress from the database or simply cache Twitter calls.

Usage

// Uncached model call
$this->blog_m->getPosts($category_id, 'live');

// cached model call
$this->cache->model('blog_m', 'getPosts', array($category_id, 'live'), 120); // keep for 2 minutes 


$this->cache->library('some_library', 'calcualte_something', array($foo, $bar, $bla)); // keep for default time (0 = unlimited)

$this->cache->write($data, 'cached-name');
$data = $this->cache->get('cached-name');

$this->cache->delete('cached-name');

Installation

Permission your cache folder to be writeable by the web server.

Requirements

Only CodeIgniter

Extra

If you'd like to request changes, report bug fixes, or contact the developer of this library, email [email protected]

codeigniter-cache's People

Stargazers

Somkiat Puisungnoen avatar

Watchers

Somkiat Puisungnoen avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.