# Function cached

- cached< T , V , Args extends any[]>(
  __namedParameters: {
  getKey: (args: Args ) => T ;
  getValue: (args: Args ) => V ;
  maxSize: number;
  },
  ): {
  cache: LRUCache < T , V >;
  getKey: (args: Args ) => T ;
  getValue: (args: Args ) => V ;
  (...args: Args ): NonNullable< V >;
  }

- #### Type Parameters

  - T
  - V
  - Args extends any[]

  #### Parameters

  - __namedParameters: { getKey: (args: Args ) => T ; getValue: (args: Args ) => V ; maxSize: number }

  #### Returns {
  cache: LRUCache < T , V >;
  getKey: (args: Args ) => T ;
  getValue: (args: Args ) => V ;
  (...args: Args ): NonNullable< V >;
  }

  - Defined in packages/lib/src/LRUCache.ts:35