case class AssetsConfiguration(path: String = "/public", urlPrefix: String = "/assets", defaultCharSet: String = "utf-8", enableCaching: Boolean = true, enableCacheControl: Boolean = false, configuredCacheControl: Map[String, Option[String]] = Map.empty, defaultCacheControl: String = "public, max-age=3600", aggressiveCacheControl: String = "public, max-age=31536000, immutable", digestAlgorithm: String = "md5", checkForMinified: Boolean = true, textContentTypes: Set[String] = Set("application/json", "application/javascript"), encodings: Seq[AssetEncoding] = Seq( AssetEncoding.Brotli, AssetEncoding.Gzip, AssetEncoding.Xz, AssetEncoding.Bzip2 )) extends Product with Serializable
- Source
- Assets.scala
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- AssetsConfiguration
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Instance Constructors
- new AssetsConfiguration(path: String = "/public", urlPrefix: String = "/assets", defaultCharSet: String = "utf-8", enableCaching: Boolean = true, enableCacheControl: Boolean = false, configuredCacheControl: Map[String, Option[String]] = Map.empty, defaultCacheControl: String = "public, max-age=3600", aggressiveCacheControl: String = "public, max-age=31536000, immutable", digestAlgorithm: String = "md5", checkForMinified: Boolean = true, textContentTypes: Set[String] = Set("application/json", "application/javascript"), encodings: Seq[AssetEncoding] = Seq( AssetEncoding.Brotli, AssetEncoding.Gzip, AssetEncoding.Xz, AssetEncoding.Bzip2 ))
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val aggressiveCacheControl: String
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val checkForMinified: Boolean
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- val configuredCacheControl: Map[String, Option[String]]
- val defaultCacheControl: String
- val defaultCharSet: String
- val digestAlgorithm: String
- val enableCacheControl: Boolean
- val enableCaching: Boolean
- val encodings: Seq[AssetEncoding]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def findConfiguredCacheControl(assetName: String): Option[String]
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.
- assetName
the asset name
- returns
the optional configured cache-control directive.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val path: String
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val textContentTypes: Set[String]
- val urlPrefix: String
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()