Overview

Packages

  • application
    • commands
    • components
      • actions
      • filters
      • leftWidget
      • permissions
      • sortableWidget
      • util
      • webupdater
      • x2flow
        • actions
        • triggers
      • X2GridView
      • X2Settings
    • controllers
    • models
      • embedded
    • modules
      • accounts
        • controllers
        • models
      • actions
        • controllers
        • models
      • calendar
        • controllers
        • models
      • charts
        • models
      • contacts
        • controllers
        • models
      • docs
        • components
        • controllers
        • models
      • groups
        • controllers
        • models
      • marketing
        • components
        • controllers
        • models
      • media
        • controllers
        • models
      • mobile
        • components
      • opportunities
        • controllers
        • models
      • products
        • controllers
        • models
      • quotes
        • controllers
        • models
      • services
        • controllers
        • models
      • template
        • models
      • users
        • controllers
        • models
      • workflow
        • controllers
        • models
      • x2Leads
        • controllers
        • models
  • Net
  • None
  • PHP
  • system
    • base
    • caching
      • dependencies
    • collections
    • console
    • db
      • ar
      • schema
        • cubrid
        • mssql
        • mysql
        • oci
        • pgsql
        • sqlite
    • i18n
      • gettext
    • logging
    • test
    • utils
    • validators
    • web
      • actions
      • auth
      • filters
      • form
      • helpers
      • renderers
      • services
      • widgets
        • captcha
        • pagers
  • Text
    • Highlighter
  • zii
    • behaviors
    • widgets
      • grid
      • jui

Classes

  • CFilter
  • CFilterChain
  • CHttpCacheFilter
  • CInlineFilter
  • Overview
  • Package
  • Class
  • Tree

Class CHttpCacheFilter

CHttpCacheFilter implements http caching. It works a lot like COutputCache as a filter, except that content caching is being done on the client side.

CComponent
Extended by CFilter implements IFilter
Extended by CHttpCacheFilter
Package: system\web\filters
Copyright: 2008-2013 Yii Software LLC
License: http://www.yiiframework.com/license/
Author: Da:Sourcerer <webmaster@dasourcerer.net>
Since: 1.1.11
Located at x2engine/framework/web/filters/CHttpCacheFilter.php
Methods summary
public boolean
# preFilter( CFilterChain $filterChain )

Performs the pre-action filtering.

Performs the pre-action filtering.

Parameters

$filterChain
CFilterChain
$filterChain the filter chain that the filter is on.

Returns

boolean
whether the filtering process should continue and the action should be executed.

Overrides

CFilter::preFilter()
protected integer|boolean
# getLastModifiedValue( )

Gets the last modified value from either CHttpCacheFilter::$lastModifiedExpression or CHttpCacheFilter::$lastModified and converts it into a unix timestamp if necessary

Gets the last modified value from either CHttpCacheFilter::$lastModifiedExpression or CHttpCacheFilter::$lastModified and converts it into a unix timestamp if necessary

Returns

integer|boolean
A unix timestamp or false if neither lastModified nor lastModifiedExpression have been set

Throws

CException
protected string|boolean
# getEtagValue( )

Gets the ETag out of either CHttpCacheFilter::$etagSeedExpression or CHttpCacheFilter::$etagSeed

Gets the ETag out of either CHttpCacheFilter::$etagSeedExpression or CHttpCacheFilter::$etagSeed

Returns

string|boolean
Either a quoted string serving as ETag or false if neither etagSeed nor etagSeedExpression have been set
protected boolean
# checkEtag( string $etag )

Check if the etag supplied by the client matches our generated one

Check if the etag supplied by the client matches our generated one

Parameters

$etag
string
$etag the supplied etag

Returns

boolean
true if the supplied etag matches $etag
protected boolean
# checkLastModified( integer $lastModified )

Checks if the last modified date supplied by the client is still up to date

Checks if the last modified date supplied by the client is still up to date

Parameters

$lastModified
integer
$lastModified the last modified date

Returns

boolean
true if the last modified date sent by the client is newer or equal to $lastModified
protected
# send304Header( )

Sends the 304 HTTP status code to the client

Sends the 304 HTTP status code to the client

protected
# sendCacheControlHeader( )

Sends the cache control header to the client

Sends the cache control header to the client

Since

1.1.12

See

CHttpCacheFilter::$cacheControl
protected
# generateEtag( mixed $seed )

Generates a quoted string out of the seed

Generates a quoted string out of the seed

Parameters

$seed
mixed
$seed Seed for the ETag
Methods inherited from CFilter
filter(), init(), postFilter()
Methods inherited from CComponent
__call(), __get(), __isset(), __set(), __unset(), asa(), attachBehavior(), attachBehaviors(), attachEventHandler(), canGetProperty(), canSetProperty(), detachBehavior(), detachBehaviors(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), getEventHandlers(), hasEvent(), hasEventHandler(), hasProperty(), raiseEvent()
Properties summary
public string|integer $lastModified
#

Timestamp for the last modification date. Must be either a string parsable by strtotime() or an integer representing a unix timestamp.

Timestamp for the last modification date. Must be either a string parsable by strtotime() or an integer representing a unix timestamp.

public string|callable $lastModifiedExpression
#

PHP Expression for the last modification date. If set, this takes precedence over CHttpCacheFilter::$lastModified.

The PHP expression will be evaluated using CComponent::evaluateExpression().

A PHP expression can be any PHP code that has a value. To learn more about what an expression is, please refer to the php manual.

PHP Expression for the last modification date. If set, this takes precedence over CHttpCacheFilter::$lastModified.

The PHP expression will be evaluated using CComponent::evaluateExpression().

A PHP expression can be any PHP code that has a value. To learn more about what an expression is, please refer to the php manual.

public mixed $etagSeed
#

Seed for the ETag. Can be anything that passes through serialize().

Seed for the ETag. Can be anything that passes through serialize().

public string|callable $etagSeedExpression
#

Expression for the ETag seed. If set, this takes precedence over CHttpCacheFilter::$etagSeed.

The PHP expression will be evaluated using CComponent::evaluateExpression().

A PHP expression can be any PHP code that has a value. To learn more about what an expression is, please refer to the php manual.

Expression for the ETag seed. If set, this takes precedence over CHttpCacheFilter::$etagSeed.

The PHP expression will be evaluated using CComponent::evaluateExpression().

A PHP expression can be any PHP code that has a value. To learn more about what an expression is, please refer to the php manual.

public string $cacheControl 'max-age=3600, public'
#

Http cache control headers. Set this to an empty string in order to keep this header from being sent entirely.

Http cache control headers. Set this to an empty string in order to keep this header from being sent entirely.

API documentation generated by ApiGen 2.8.0