Interface FileCache

    • Method Detail

      • getSize

        long getSize()
        Gets the size of the cache, in bytes.
      • getNumberOfItems

        int getNumberOfItems()
        Gets the number of items in the cache.
      • getFile

        File getFile​(String key)
        Gets a file from the cache.

        A returned file will never be deleted from the filesystem while the returned file object is still referenced, although it may be purged from the cache.

        Parameters:
        key - the cache key
        Returns:
        the cached file, or null if absent
      • clear

        void clear()
        Clears the cache.

        Files will not be deleted from the filesystm while the returned file objects are still referenced.