Options
All
  • Public
  • Public/Protected
  • All
Menu

Module cacheIt

Index

References

Interfaces

Type aliases

Functions Util

References

Renames and re-exports cacheIt

Type aliases

CachedClass<T>: new (...args: any[]) => CachedObject<T>

Type parameters

  • T

Type declaration

CachedFunction<T>: T & { __cache_storage: CacheProvider<string, ReturnType<T>>; __cache_clear: any }

Type parameters

CachedObject<T>: { [ K in keyof T]: T[K] extends (...args: any[]) => any ? CachedFunction<T[K]> : T[K] }

Type parameters

  • T = any

Util Functions

  • make all methods of object are cached

    since

    5.16.0

    Type parameters

    Parameters

    Returns CachedFunction<T>

  • create a class wrapper, the instance created by that wrapper will automatically apply cacheIt

    since

    5.16.0

    Type parameters

    • T

    Parameters

    Returns CachedClass<T>

  • make function is cached, default with LRU container

    since

    5.16.0

    Type parameters

    • T: object

    Parameters

    Returns CachedObject<T>