Add cache control to page state modules
Closed this issue · 1 comments
aleclarson commented
Add cache control to page state modules
aleclarson commented
This is now possible in the next
branch
import { defineStateModule } from 'saus/client'
export const someState = defineStateModule('someState', function() {
this.maxAge = 60 // expire in 60 seconds
return Math.random()
})