All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.rtr.alchemy.caching.CacheStrategy Maven / Gradle / Ivy

There is a newer version: 2.2.16
Show newest version
package io.rtr.alchemy.caching;

import io.rtr.alchemy.models.Experiment;

/** Defines the behavior for when to invalidate items in the cache */
public interface CacheStrategy {
    /** Fires when an experiment is loaded from the store */
    void onLoad(Experiment experiment, CachingContext context);

    /** Fires when an experiment is saved to the store */
    void onSave(Experiment experiment, CachingContext context);

    /** Fires when an experiment is deleted from the store */
    void onDelete(String experimentName, CachingContext context);

    /** Fires before an experiment is read from the cache */
    void onCacheRead(String experimentName, CachingContext context);

    /** Fires before all experiments are read from the cache */
    void onCacheRead(CachingContext context);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy