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
Link to this callback
render/3
-callback render(Params :: list(), Vars :: map(), Context :: z:context()) -> term().
Link to this callback
vary/2
-callback vary(Params :: list(), Context :: z:context()) -> atom().