alloc/saus

Add cache control to page state modules

Closed this issue · 1 comments

Add cache control to page state modules

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()
})