@Test @Order(1) void addingValueToCache() { assertDoesNotThrow(() -> cache().addToCache(testKey, testVal), "Add to cache threw an exception"); }
@Override public void addToCache(String key, String value) throws CacheStoreException { Objects.requireNonNull(key, Utils.getMessage("IMG-0066")); Objects.requireNonNull(value, "Cache item value cannot be null"); properties.put(key.toLowerCase(), value); persistToDisk(); }
FileCacheStore implements CacheStore { @Override public void addToCache(String key, String value) throws CacheStoreException { Objects.requireNonNull(key, Utils.getMessage("IMG-0066")); Objects.requireNonNull(value, "Cache item value cannot be null"); properties.put(key.toLowerCase(), value); persistToDisk(); } }
FileCacheStore implements CacheStore { @Override public void addToCache(String key, String value) throws CacheStoreException { Objects.requireNonNull(key, Utils.getMessage("IMG-0066")); Objects.requireNonNull(value, "Cache item value cannot be null"); properties.put(key.toLowerCase(), value); persistToDisk(); } FileCacheStore(); }
FileCacheStore implements CacheStore { @Override public void addToCache(String key, String value) throws CacheStoreException { Objects.requireNonNull(key, Utils.getMessage("IMG-0066")); Objects.requireNonNull(value, "Cache item value cannot be null"); properties.put(key.toLowerCase(), value); persistToDisk(); } FileCacheStore(); @Override String getCacheDir(); @Override String getValueFromCache(String key); @Override boolean hasMatchingKeyValue(String key, String value); @Override void addToCache(String key, String value); @Override String deleteFromCache(String key); @Override void clearCache(); @Override Map<String, String> getCacheItems(); }
FileCacheStore implements CacheStore { @Override public void addToCache(String key, String value) throws CacheStoreException { Objects.requireNonNull(key, Utils.getMessage("IMG-0066")); Objects.requireNonNull(value, "Cache item value cannot be null"); properties.put(key.toLowerCase(), value); persistToDisk(); } FileCacheStore(); @Override String getCacheDir(); @Override String getValueFromCache(String key); @Override boolean hasMatchingKeyValue(String key, String value); @Override void addToCache(String key, String value); @Override String deleteFromCache(String key); @Override void clearCache(); @Override Map<String, String> getCacheItems(); static final String CACHEDIR; }