code: def clear_cache():
      '''
      Clear out cached state files, forcing even cache runs to refresh the cache
      on the next state execution.
  
      Remember that the state cache is completely disabled by default, this
      execution only applies if cache=True is used in states
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' state.clear_cache
      '''
      ret = []
      for fn_ in os.listdir(__opts__['cachedir']):
          if fn_.endswith('.cache.p'):
              path = os.path.join(__opts__['cachedir'], fn_)
              if not os.path.isfile(path):
                  continue
              os.remove(path)
              ret.append(fn_)
      return ref clear_cache():
      '''
      Clear out cached state files, forcing even cache runs to refresh the cache
      on the next state execution.
  
      Remember that the state cache is completely disabled by default, this
      execution only applies if cache=True is used in states
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' state.clear_cache
      '''
      ret = []
      for fn_ in os.listdir(__opts__['cachedir']):
          if fn_.endswith('.cache.p'):
              path = os.path.join(__opts__['cachedir'], fn_)
              if not os.path.isfile(path):
                  continue
              os.remove(path)
              ret.append(fn_)
      return ret
docs: Clear out cached state files, forcing even cache runs to refresh the cache
      on the next state execution.
  
      Remember that the state cache is completely disabled by default, this
      execution only applies if cache=True is used in states
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' state.clear_cache