Overview

Packages

  • akismet
  • None
  • PHP
  • Smarty
    • Cacher
    • Compiler
    • Config
    • Debug
    • plugins
    • PluginsBlock
    • PluginsFilter
    • PluginsFunction
    • PluginsInternal
    • PluginsModifier
    • PluginsModifierCompiler
    • PluginsShared
    • Security
    • Template
    • TemplateResources
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Signatures
    • Signed
    • Transport
  • wa-apps
    • blog
      • actions
        • backend
        • blog
        • comment
        • cron
        • design
        • frontend
        • page
        • plugin
        • post
      • api
        • v1
      • cli
      • layout
      • model
      • plugin
        • aksimet
        • category
        • emailsubscription
        • favorite
        • gravatar
        • import
        • markdown
        • myposts
        • tag
        • troll
      • settings
    • checklists
      • backend
      • json
    • contacts
      • backend
    • developer
    • dummy
    • guestbook
    • guestbook2
    • photos
      • album
      • api
        • v1
      • backend
      • design
      • dialog
      • frontend
      • page
      • photo
      • plugin
        • comment
        • imageeffects
        • import
        • publicgallery
        • watermark
      • search
      • settings
      • stack
      • tag
      • upload
    • site
      • backend
      • blocks
      • config
      • design
      • domains
      • files
      • frontend
      • helper
      • layout
      • pages
      • routing
      • setting
    • stickies
      • api
        • v1
      • sheet
      • stiky
  • wa-plugin
    • payment
    • shipping
    • sms
  • wa-plugins
    • shipping
      • usps
  • wa-system
    • API
    • Auth
      • Adapters
    • Autoload
    • Cache
      • Adapter
    • Captcha
    • Config
    • Contact
    • controller
    • currency
    • database
    • datetime
    • design
    • event
    • exception
    • files
    • image
    • layout
    • locale
    • log
    • mail
    • page
      • action
      • model
    • payment
    • plugin
    • request
    • response
    • routing
    • shipping
    • sms
    • storage
    • user
    • util
    • validator
    • view
    • webasyst
      • api
      • backend
      • cli
      • config
      • layout
      • login
      • model
      • password
      • payment
      • profile
      • settings
      • shipment
    • widget
    • workflow
  • waPlugins
    • Payment
  • webasyst
    • wa-system
      • helper

Classes

  • Smarty_CacheResource
  • Smarty_CacheResource_Custom
  • Smarty_CacheResource_KeyValueStore
  • Smarty_Internal_CacheResource_File
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class Smarty_CacheResource_Custom

Cache Handler API

Smarty_CacheResource
Extended by Smarty_CacheResource_Custom
Abstract
Package: Smarty\Cacher
Author: Rodney Rehm
Located at wa-system/vendors/smarty3/sysplugins/smarty_cacheresource_custom.php
Methods summary
abstract protected
# fetch( string $id, string $name, string $cache_id, string $compile_id, string & $content, integer & $mtime )

fetch cached content and its modification time from data source

fetch cached content and its modification time from data source

Parameters

$id
string
$id unique cache content identifier
$name
string
$name template name
$cache_id
string
$cache_id cache id
$compile_id
string
$compile_id compile id
$content
string
$content cached content
$mtime
integer
$mtime cache modification timestamp (epoch)
protected integer|boolean
# fetchTimestamp( string $id, string $name, string $cache_id, string $compile_id )

Fetch cached content's modification timestamp from data source

Fetch cached content's modification timestamp from data source

implementing this method is optional. Only implement it if modification times can be accessed faster than loading the complete cached content.}

Parameters

$id
string
$id unique cache content identifier
$name
string
$name template name
$cache_id
string
$cache_id cache id
$compile_id
string
$compile_id compile id

Returns

integer|boolean
timestamp (epoch) the template was modified, or false if not found
abstract protected boolean
# save( string $id, string $name, string $cache_id, string $compile_id, integer|null $exp_time, string $content )

Save content to cache

Save content to cache

Parameters

$id
string
$id unique cache content identifier
$name
string
$name template name
$cache_id
string
$cache_id cache id
$compile_id
string
$compile_id compile id
$exp_time
integer|null
$exp_time seconds till expiration or null
$content
string
$content content to cache

Returns

boolean
success
abstract protected integer
# delete( string $name, string $cache_id, string $compile_id, integer|null $exp_time )

Delete content from cache

Delete content from cache

Parameters

$name
string
$name template name
$cache_id
string
$cache_id cache id
$compile_id
string
$compile_id compile id
$exp_time
integer|null
$exp_time seconds till expiration time in seconds or null

Returns

integer
number of deleted caches
public
# populate( Smarty_Template_Cached $cached, Smarty_Internal_Template $_template )

populate Cached Object with meta data from Resource

populate Cached Object with meta data from Resource

Parameters

$cached
Smarty_Template_Cached
$cached cached object
$_template
Smarty_Internal_Template
$_template template object
public
# populateTimestamp( Smarty_Template_Cached $cached )

populate Cached Object with timestamp and exists from Resource

populate Cached Object with timestamp and exists from Resource

Parameters

$cached
Smarty_Template_Cached
$source cached object
public booelan
# process( Smarty_Internal_Template $_template, Smarty_Template_Cached $cached = null )

Read the cached template and process the header

Read the cached template and process the header

Parameters

$_template
Smarty_Internal_Template
$_template template object
$cached
Smarty_Template_Cached
$cached cached object

Returns

booelan
true or false if the cached content does not exist
public boolean
# writeCachedContent( Smarty_Internal_Template $_template, string $content )

Write the rendered template output to cache

Write the rendered template output to cache

Parameters

$_template
Smarty_Internal_Template
$_template template object
$content
string
$content content to cache

Returns

boolean
success
public integer
# clearAll( Smarty $smarty, integer $exp_time = null )

Empty cache

Empty cache

Parameters

$smarty
Smarty
$smarty Smarty object
$exp_time
integer
$exp_time expiration time (number of seconds, not timestamp)

Returns

integer
number of cache files deleted
public integer
# clear( Smarty $smarty, string $resource_name, string $cache_id, string $compile_id, integer $exp_time )

Empty cache for a specific template

Empty cache for a specific template

Parameters

$smarty
Smarty
$smarty Smarty object
$resource_name
string
$resource_name template name
$cache_id
string
$cache_id cache id
$compile_id
string
$compile_id compile id
$exp_time
integer
$exp_time expiration time (number of seconds, not timestamp)

Returns

integer
number of cache files deleted
public booelan
# hasLock( Smarty $smarty, Smarty_Template_Cached $cached )

Check is cache is locked for this template

Check is cache is locked for this template

Parameters

$smarty
Smarty
$smarty Smarty object
$cached
Smarty_Template_Cached
$cached cached object

Returns

booelan
true or false if cache is locked

Overrides

Smarty_CacheResource::hasLock()
public
# acquireLock( Smarty $smarty, Smarty_Template_Cached $cached )

Lock cache for this template

Lock cache for this template

Parameters

$smarty
Smarty
$smarty Smarty object
$cached
Smarty_Template_Cached
$cached cached object

Overrides

Smarty_CacheResource::acquireLock()
public
# releaseLock( Smarty $smarty, Smarty_Template_Cached $cached )

Unlock cache for this template

Unlock cache for this template

Parameters

$smarty
Smarty
$smarty Smarty object
$cached
Smarty_Template_Cached
$cached cached object

Overrides

Smarty_CacheResource::releaseLock()
Methods inherited from Smarty_CacheResource
getCachedContent(), invalidLoadedCache(), load(), locked()
Properties inherited from Smarty_CacheResource
$resources, $sysplugins
My fork of Webasyst Framework API documentation generated by ApiGen 2.8.0