PHP Class Spatie\PartialCache\PartialCache

Afficher le fichier Open project: spatie/laravel-partialcache

Protected Properties

Свойство Type Description
$cache Illuminate\Contracts\Cache\Repository
$cacheIsTaggable boolean
$cacheKey string
$cacheManager Illuminate\Contracts\Cache\Factory
$enabled boolean
$view Illuminate\Contracts\View\Factory

Méthodes publiques

Méthode Description
__construct ( Illuminate\Contracts\View\Factory $view, Illuminate\Contracts\Cache\Repository $cache, Illuminate\Contracts\Cache\Factory $cacheManager, Illuminate\Contracts\Config\Repository $config )
cache ( array $data, string $view, array $mergeData = null, integer $minutes = null, string $key = null, string | array $tag = null ) : string Cache a view. If minutes are null, the view is cached forever.
flush ( string $tag = null ) Empty all views linked to a tag or the complete partial cache.
forget ( string $view, string $key = null ) Forget a rendered view.
getCacheKeyForView ( string $view, string $key = null ) : string Create a key name for the cached view.

Méthodes protégées

Méthode Description
renderView ( string $view, array $data, array $mergeData ) : string Render a view.

Method Details

__construct() public méthode

public __construct ( Illuminate\Contracts\View\Factory $view, Illuminate\Contracts\Cache\Repository $cache, Illuminate\Contracts\Cache\Factory $cacheManager, Illuminate\Contracts\Config\Repository $config )
$view Illuminate\Contracts\View\Factory
$cache Illuminate\Contracts\Cache\Repository
$cacheManager Illuminate\Contracts\Cache\Factory
$config Illuminate\Contracts\Config\Repository

cache() public méthode

Cache a view. If minutes are null, the view is cached forever.
public cache ( array $data, string $view, array $mergeData = null, integer $minutes = null, string $key = null, string | array $tag = null ) : string
$data array
$view string
$mergeData array
$minutes integer
$key string
$tag string | array
Résultat string

flush() public méthode

Note: Only supported by Taggable cache drivers.
public flush ( string $tag = null )
$tag string

forget() public méthode

Forget a rendered view.
public forget ( string $view, string $key = null )
$view string
$key string

getCacheKeyForView() public méthode

Create a key name for the cached view.
public getCacheKeyForView ( string $view, string $key = null ) : string
$view string
$key string
Résultat string

renderView() protected méthode

Render a view.
protected renderView ( string $view, array $data, array $mergeData ) : string
$view string
$data array
$mergeData array
Résultat string

Property Details

$cache protected_oe property

protected Repository,Illuminate\Contracts\Cache $cache
Résultat Illuminate\Contracts\Cache\Repository

$cacheIsTaggable protected_oe property

protected bool $cacheIsTaggable
Résultat boolean

$cacheKey protected_oe property

protected string $cacheKey
Résultat string

$cacheManager protected_oe property

protected Factory,Illuminate\Contracts\Cache $cacheManager
Résultat Illuminate\Contracts\Cache\Factory

$enabled protected_oe property

protected bool $enabled
Résultat boolean

$view protected_oe property

protected Factory,Illuminate\Contracts\View $view
Résultat Illuminate\Contracts\View\Factory