Skip to content
This repository has been archived by the owner on Aug 31, 2024. It is now read-only.

Latest commit

 

History

History
28 lines (21 loc) · 639 Bytes

response-caching.md

File metadata and controls

28 lines (21 loc) · 639 Bytes

Response Caching

Koala features response caching, internally spelled as "cash". This allows you to avoid using complex varnish and such infrastructure to cash dynamic pages. For example, you may want to cache pages for visitors, but not for users as user pages are all customized.

Response caching is internally opt-in as it requires a database store. See koa-cash for more details.

options.cash

All options passed to koa-cash must be hashed by .cash.

const app = koala({
  cash: {
    get: function () {

    },
    set: function () {

    }
  }
})