Class EvictStaleCachedResponsesJobFactory

java.lang.Object
edu.ucsb.cs156.diningcachingproxy.services.EvictStaleCachedResponsesJobFactory

@Service public class EvictStaleCachedResponsesJobFactory extends Object
Builds and launches an EvictStaleCachedResponsesJob. Shared by the nightly scheduled run and the admin's manual trigger, so there's exactly one place that turns "max age in days" into a cutoff instant.
  • Constructor Details

    • EvictStaleCachedResponsesJobFactory

      public EvictStaleCachedResponsesJobFactory()
  • Method Details

    • launch

      public edu.ucsb.cs156.jobs.entities.Job launch()
      Launches an eviction run using the configured default max age.
    • launch

      public edu.ucsb.cs156.jobs.entities.Job launch(int maxAgeDays)
      Launches an eviction run that deletes every entry not accessed in the last maxAgeDays days. Zero is allowed and evicts everything not accessed as of right now.