class_docstr: The librosa cache manager class wraps joblib.Memory
  with a __call__ attribute, so that it may act as a function.
  
  Additionally, it provides a caching level filter, so that
  different functions can be cached or not depending on the user's
  preference for speed vs. storage usage.
class_docstr_tok: ["The","librosa","cache","manager","class","wraps","joblib.Memory","with","a","__call__","attribute",",","so","that","it","may","act","as","a","function",".","Additionally",",","it","provides","a","caching","level","filter",",","so","that","different","functions","can","be","cached","or","not","depending","on","the","user's","preference","for","speed","vs.","storage","usage","."]
docstr: Cache with an explicitly defined level.
  
  Example usage:
  
  @cache(level=2)
  def semi_important_function(some_arguments):
      ...
docstr_tok: ["Cache","with","an","explicitly","defined","level",".","Example","usage",":","@","cache","(","level=2",")","def","semi_important_function","(","some_arguments",")",":","..."]
code: def __call__(self, level: int) -> Callable[[_F], _F]:
      """
      Cache with an explicitly defined level.
  
      Example usage:
  
      @cache(level=2)
      def semi_important_function(some_arguments):
          ...
      """
  
      def wrapper(function):
          """Add an input/output cache to the specified function."""
          if self.memory.location is not None and self.level >= level:
              return _decorator_apply(self.memory.cache, function)
  
          else:
              return function
  
      return wrapper
  
file_path: librosa/librosa/_cache.py
imports: import os
  from typing import Any, Callable, TypeVar
  from joblib import Memory
  from decorator import FunctionMaker
label_desc: Use image node_id 2 for calling the CacheManager obj's underlying member method code with example usage: obj.__call__(level) and returns: wrapper, _decorator_apply, function