zotonic_scomp behaviour (zotonic_core v1.0.0-rc.11)

Scomp behaviour definition. A scomp is a screen component that can optionally be cached.

render(Params, Vars, Context) -> {ok, NewContext} | {ok, iolist()} | {error, Error}

vary(Params, Context) -> {EssentialParams, MaxAge, Vary} | nocache | default

Params = proplist() EssentialParams = proplist() (proplist with params that make differences in the cache key) MaxAge = integer() Vary = TermList (used as dependencies for the depcache)

Link to this section Summary

Link to this section Callbacks

-callback render(Params :: list(), Vars :: map(), Context :: z:context()) -> term().
-callback vary(Params :: list(), Context :: z:context()) -> atom().