OxL Reference

error cache-not-readonly

error Standard: [§10.2]

What it means#

A response cache is only correct for calls that do not change state.

Example#

oxl✓ checked in CI
service Catalog {
  @cache(ttl: 1s)       // <- cache-not-readonly
  rpc item(id: u64) -> i32
}
error
cache-not-readonly

How to fix#

Mark the rpc @readonly, or drop @cache.

See also#

OxL 1.0.0-beta · Documentation version 1.0.0-beta© OxwaldLink · generated from the Standard, the std sources and the guides