Enum NetworkOptions.CacheStrategy

    • Enum Constant Detail

      • TIMED_CACHE

        public static final NetworkOptions.CacheStrategy TIMED_CACHE
        If there is no cache or if the cache is too old it will download from server. This is the default option.
      • CACHE_FIRST

        public static final NetworkOptions.CacheStrategy CACHE_FIRST
        Force to use cache even if it's too old. If there is not cache available it will try to download from server.
      • IGNORE_CACHE

        public static final NetworkOptions.CacheStrategy IGNORE_CACHE
        Force download from server, the cache won't be used. Recommended only for development.
      • SERVER_FIRST

        public static final NetworkOptions.CacheStrategy SERVER_FIRST
        Force download from server. If the server is not responding or there is no internet connection it will use the cache. Recommended only for development.
    • Method Detail

      • values

        public static NetworkOptions.CacheStrategy[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (NetworkOptions.CacheStrategy c : NetworkOptions.CacheStrategy.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static NetworkOptions.CacheStrategy valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null