Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/43' into develop
Browse files Browse the repository at this point in the history
Forward port #43
  • Loading branch information
weierophinney committed Jan 19, 2016
2 parents 2392e92 + 8dbebb6 commit 4f9d31b
Show file tree
Hide file tree
Showing 9 changed files with 452 additions and 0 deletions.
24 changes: 24 additions & 0 deletions doc/book/zend.cache.pattern.callback-cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,30 @@ $callbackCache->setOptions(new PatternOptions(array(

## Available Methods

call(callable $callback, array $args = array())

> Call the specified callback or get the result from cache.
rtype
mixed
Function call handler.
rtype
mixed
generateKey(callable $callback, array $args = array())

> Generate a unique key in base of a key representing the callback part and a key representing the
arguments part.
rtype
string
setOptions(Zend\\Cache\\Pattern\\PatternOptions $options)

> Set pattern options.
rtype
Zend\\Cache\\Pattern\\CallbackCache
getOptions()

> Get all pattern options.
rtype
Zend\\Cache\\Pattern\\PatternOptions
## Examples

**Instantiating the callback cache pattern**
Expand Down
40 changes: 40 additions & 0 deletions doc/book/zend.cache.pattern.capture-cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,46 @@ header('Status: 200', true, 200);

## Available Methods

start(string|null $pageId = null)

> Start capturing output.
rtype
void
set(string $content, string|null $pageId = null)

> Write content to page identity.
rtype
void
get(string|null $pageId = null)

> Get content of an already cached page.
rtype
string|false
has(string|null $pageId = null)

> Check if a page has been created.
rtype
boolean
remove(string|null $pageId = null)

> Remove a page.
rtype
boolean
clearByGlob(string $pattern = '\*\*')

> Clear pages matching glob pattern.
rtype
void
setOptions(Zend\\Cache\\Pattern\\PatternOptions $options)

> Set pattern options.
rtype
Zend\\Cache\\Pattern\\CaptureCache
getOptions()

> Get all pattern options.
rtype
Zend\\Cache\\Pattern\\PatternOptions
## Examples

**Scaling images in base of request**
Expand Down
25 changes: 25 additions & 0 deletions doc/book/zend.cache.pattern.class-cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,43 @@ $classCache = PatternFactory::factory('class', array(

## Available Methods

call(string $method, array $args = array())

> Call the specified method of the configured class.
> rtype
mixed
Call the specified method of the configured class.
rtype
mixed
Set a static property of the configured class.
rtype
void
Get a static property of the configured class.
rtype
mixed
Checks if a static property of the configured class exists.
rtype
boolean
Unset a static property of the configured class.
rtype
void
generateKey(string $method, array $args = array())

> Generate a unique key in base of a key representing the callback part and a key representing the
arguments part.
rtype
string
setOptions(Zend\\Cache\\Pattern\\PatternOptions $options)

> Set pattern options.
rtype
Zend\\Cache\\Pattern\\ClassCache
getOptions()

> Get all pattern options.
rtype
Zend\\Cache\\Pattern\\PatternOptions
## Examples

**Caching of import feeds**
Expand Down
12 changes: 12 additions & 0 deletions doc/book/zend.cache.pattern.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,15 @@ $callbackCache->setOptions(new Zend\Cache\Pattern\PatternOptions(array(

The following methods are implemented by `Zend\Cache\Pattern\AbstractPattern`. Please read
documentation of specific patterns to get more information.

setOptions(Zend\\Cache\\Pattern\\PatternOptions $options)

> Set pattern options.
rtype
Zend\\Cache\\Pattern\\PatternInterface
getOptions()

> Get all pattern options.
rtype
Zend\\Cache\\Pattern\\PatternOptions

25 changes: 25 additions & 0 deletions doc/book/zend.cache.pattern.object-cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,43 @@ $objectCache = PatternFactory::factory('object', array(

## Available Methods

call(string $method, array $args = array())

> Call the specified method of the configured object.
> rtype
mixed
Call the specified method of the configured object.
rtype
mixed
Set a property of the configured object.
rtype
void
Get a property of the configured object.
rtype
mixed
Checks if static property of the configured object exists.
rtype
boolean
Unset a property of the configured object.
rtype
void
generateKey(string $method, array $args = array())

> Generate a unique key in base of a key representing the callback part and a key representing the
arguments part.
rtype
string
setOptions(Zend\\Cache\\Pattern\\PatternOptions $options)

> Set pattern options.
rtype
Zend\\Cache\\Pattern\\ObjectCache
getOptions()

> Get all pattern options.
rtype
Zend\\Cache\\Pattern\\PatternOptions
## Examples

**Caching a filter**
Expand Down
22 changes: 22 additions & 0 deletions doc/book/zend.cache.pattern.output-cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,28 @@ $outputCache = PatternFactory::factory('output', array(

## Available Methods

start(string $key)

> If there is a cached item with the given key display it's data and return `true` else start
buffering output until `end()` is called or the script ends and return `false`.
rtype
boolean
end()

> Stops buffering output, write buffered data to cache using the given key on `start()` and displays
the buffer.
rtype
boolean
setOptions(Zend\\Cache\\Pattern\\PatternOptions $options)

> Set pattern options.
rtype
Zend\\Cache\\Pattern\\OutputCache
getOptions()

> Get all pattern options.
rtype
Zend\\Cache\\Pattern\\PatternOptions
## Examples

**Caching simple view scripts**
Expand Down
Loading

0 comments on commit 4f9d31b

Please sign in to comment.