AssetsConfiguration

controllers.AssetsConfiguration
See theAssetsConfiguration companion object
case class AssetsConfiguration(path: String, urlPrefix: String, defaultCharSet: String, enableCaching: Boolean, enableCacheControl: Boolean, configuredCacheControl: Map[String, Option[String]], defaultCacheControl: String, aggressiveCacheControl: String, digestAlgorithm: String, checkForMinified: Boolean, textContentTypes: Set[String], encodings: Seq[AssetEncoding])

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

Finds the configured Cache-Control directive that needs to be applied to the asset with the given name.

Finds the configured Cache-Control directive that needs to be applied to the asset with the given name.

This will try to find the most specific directive configured for the asset. For example, given the following configuration:

 "play.assets.cache./public/css"="max-age=100"
 "play.assets.cache./public/javascript"="max-age=200"
 "play.assets.cache./public/javascript/main.js"="max-age=300"

Given asset name "/public/css/main.css", it will find "max-age=100".

Given asset name "/public/javascript/other.js" it will find "max-age=200".

Given asset name "/public/javascript/main.js" it will find "max-age=300".

Given asset name "/public/images/img.png" it will use the defaultCacheControl since there is no specific directive configured for this asset.

Value parameters

assetName

the asset name

Attributes

Returns

the optional configured cache-control directive.

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product