Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface SimpleCacheCleaner<T>

Simple function used to clean cache value for value. Function should return true, if value should removed from cache.

Example implementation:

private static cleanCache(): SimpleCacheCleaner<Mytype> {
  return (value: Mytype) => {
    return new Date().getTime() - value.age > 10000;
  };
}
export
interface

SimpleCacheCleaner

template

T

Type parameters

  • T

Hierarchy

  • SimpleCacheCleaner

Callable

  • __call(value: T): boolean
  • Simple function used to clean cache value for value. Function should return true, if value should removed from cache.

    Example implementation:

    private static cleanCache(): SimpleCacheCleaner<Mytype> {
      return (value: Mytype) => {
        return new Date().getTime() - value.age > 10000;
      };
    }

    Parameters

    • value: T

    Returns boolean