UNPKG

@httpc/kit

Version:

httpc toolbox for building function-based API with minimal code and end-to-end type safety

7 lines (6 loc) 218 B
import { RESOLVE, useContainer } from "../di"; export function useCache(key) { const container = useContainer(); const caching = RESOLVE(container, "ICachingService"); return caching.getCache(key); }