Thule - 0.9.6
  • Welcome
  • Introduction
  • - MVC(Model-View-Controller)
    - Architecture of Framework
    - Flow Chart of Application
    - Services In One Server
    - Developing Guide
    - Features
  • Installation
  • Getting Started
  • - Direct Access HTTP
    - Router Access HTTP
    - Router Direct Access HTTP
    - Reserved Function
    - Convention
    - Bootstrap
    - Pack Javascript , CSS
  • Basic Modules
  • - Model
    - View
    - Controller
  • Libraries
  • - Router
    - Config
    - Response
    - Request
    - Database
    - Query
    - Cache
    - Debug
    - Log
    - Unit Test
    - Registry
    - Profile
  • Helper
  • - Auth
    - Calendar
    - Date
    - Error page
    - Email
    - Form
    - GeoIP
    - Google
    - Html Element
    - Html
    - Http
    - I18n
    - Image
    - Json
    - Jquery
    - Login
    - Layout
    - Locale
    - PHP to Javascript
    - Paging
    - Payflow
    - Soap
    - Text
    - Table
    - Uri
    - Upload
    - Validation
  • Plugins
  • - Smarty Template Engine
  • History
  • Home > Cache

    Cache is very helpful for performance your site with using database.

    Configuration

    If you want use the cache, you have to turn on the configure "config/dev_config.php"

    $config['query_cache']=TRUE;

    Get status of Cache

    If you want to see the status of cache.just code like below

    Cache::getCacheStatus();

    This is a structure of cache,you can see access counts,query,result of query and hit counts.

    [access] => 0
    [2eae6981f4f55eff8313ee048957563c] => Array
            (
                   [result] => Array
                          (
                          [0] => Array
                          (
                                 [member_id] => 1
                                 [member_name] => Welcome to Thule
                          )
                   )
                   [hitratio] => 1
                   [sql] => select * from db_thule.tb_member where member_id='1'
            )

    How to set File Cache Directory

    you can set the path in views/gate.php

    define('CACHE_PATH',LOG_PATH.'/cache'); // cache directory

    How to set File Cache Configure

    you can set the configure in application/config/dev_config.php

    $config['cache_file']=TRUE; //file cache
    $config['cache_file_interval']=5*60; // 5mins