Contents

October\Rain\Assetic\Asset\AssetCache

Overview

AssetCache caches an asset to avoid the cost of loading and dumping.

Implements
  • October\Rain\Assetic\Asset\AssetInterface

Protected Properties

protected AssetInterface $asset

protected CacheInterface $cache


Public Methods

public __construct()

public __construct($asset, $cache): void

public clearFilters()

public clearFilters(): void 

public dump()

public dump($additionalFilter = null): string 

public ensureFilter()

public ensureFilter($filter): void 

public getContent()

public getContent(): string|null 

public getFilters()

public getFilters(): array 

public getLastModified()

public getLastModified(): int|null 

public getSourceDirectory()

public getSourceDirectory(): string|null 

public getSourcePath()

public getSourcePath(): string|null 

public getSourceRoot()

public getSourceRoot(): string|null 

public getTargetPath()

public getTargetPath(): string|null 

public getValues()

public getValues(): array 

public getVars()

public getVars(): array 

public load()

public load($additionalFilter = null): void 

public setContent()

public setContent($content): void 

public setTargetPath()

public setTargetPath($targetPath): void 

public setValues()

public setValues($values): void 

Protected Methods

protected static getCacheKey()

protected static getCacheKey(
    AssetInterface $asset,
    FilterInterface $additionalFilter = null,
    string $salt = ''
): string 

getCacheKey returns a cache key for the current asset. The key is composed of everything but an asset's content:

  • source root
  • source path
  • target url
  • last modified
  • filters