Resource Cache

Web content

restdb.io lets you control both client cache and server cache using the global settings. In the Settings tab (while in development mode) you can enter a JSON configuration for how the server and clients should cache your Page content.

For example, to cache all Javascript and CSS on the client, and cache a specific Page on both client and server:

{
  "restdb": {
    "cache": [
      {
        "content-type": "text/css",
        "client-max-age": 86400
      },
      {
        "content-type": "text/javascript",
        "client-max-age": 86400
      },
      {
        "match": "index\.html",
        "server-max-age": 60,
        "client-max-age": 3600
      }
    ]
  }
}
  • "content-type" - exact match of Page content type
  • "match" - a regular expression that matches your Page name
  • "client-max-age" - client cache in seconds
  • "server-max-age" - server cache in seconds

Media archive resorces are cached on web clients automatically in 24 hrs.