Interface ResetCacheHandler

  • All Known Implementing Classes:
    BuildMetadataCacheResetHandler

    public interface ResetCacheHandler
    The handler of reset cache action.

    You should register your cache handler, if your component uses persistent cache, and you would like to be able reset this cache from UI (see ResetCacheController class).

    To register the handler use ResetCacheRegister class.

    Since:
    5.1
    Author:
    Maxim Podkolzine (maxim.podkolzine@jetbrains.com)
    • Method Detail

      • listCaches

        @NotNull
        List<String> listCaches()
        Returns the list of cache names. Try to make this method fast.
        Returns:
        list of cache names
      • isEmpty

        boolean isEmpty​(@NotNull
                        String name)
        Returns whether the cache denoted by name is empty. The specified name is guaranteed to be from the list returned by listCaches.
        Parameters:
        name - cache name
        Returns:
        true if the cache is empty
      • resetCache

        void resetCache​(@NotNull
                        String name)
        Resets the cache (erases all stored entries). After reset the cache should be empty. The specified name is guaranteed to be from the list returned by listCaches.
        Parameters:
        name - cache name