Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Zend Cache Laravel Package

zendframework/zend-cache

zendframework/zend-cache provides flexible caching for PHP apps with multiple storage backends (filesystem, memory, APCu, Redis, and more). Supports cache patterns, plugins, serialization, and configurable adapters to improve performance and reduce repeated work.

View on GitHub
Deep Wiki
Context7

OutputCache

The OutputCache pattern caches output between calls to start() and end().

Quick Start

use Zend\Cache\PatternFactory;

$outputCache = PatternFactory::factory('output', [
    'storage' => 'apc'
]);

Configuration Options

Option Data Type Default Value Description
storage `string array Zend\Cache\Storage\StorageInterface`

Available Methods

In addition to the methods defined in PatternInterface, this implementation defines the following methods.

namespace Zend\Cache\Pattern;

use Zend\Cache\Exception;

class OutputCache extends AbstractPattern
{
    /**
     * If there is a cached item with the given key, display its data, and
     * return true. Otherwise, start buffering output until end() is called, or
     * the script ends.
     *
     * [@param](https://github.com/param)  string  $key Key
     * [@throws](https://github.com/throws) Exception\MissingKeyException if key is missing
     * [@return](https://github.com/return) bool
     */
    public function start($key);

    /**
     * Stop buffering output, write buffered data to the cache using the key
     * provided to start(), and display the buffer.
     *
     * [@throws](https://github.com/throws) Exception\RuntimeException if output cache not started or buffering not active
     * [@return](https://github.com/return) bool TRUE on success, FALSE on failure writing to cache
     */
    public function end();
}

Examples

Caching simple View Scripts

$outputCache = Zend\Cache\PatternFactory::factory('output', [
    'storage' => 'apc',
]);

$outputCache->start('mySimpleViewScript');
include '/path/to/view/script.phtml';
$outputCache->end();
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport