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 mixed $asset

protected mixed $cache


Public Methods

public __construct()

public __construct($asset, $cache): void

public clearFilters()

public clearFilters(): void

public dump()

public dump($additionalFilter = null): void

public ensureFilter()

public ensureFilter($filter): void

public getContent()

public getContent(): void

public getFilters()

public getFilters(): void

public getLastModified()

public getLastModified(): void

public getSourceDirectory()

public getSourceDirectory(): void

public getSourcePath()

public getSourcePath(): void

public getSourceRoot()

public getSourceRoot(): void

public getTargetPath()

public getTargetPath(): void

public getValues()

public getValues(): void

public getVars()

public getVars(): void

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