Skip to content

Instantly share code, notes, and snippets.

@oofnivek
Created January 15, 2023 17:39
Show Gist options
  • Save oofnivek/b8f959ebe701f79069a2cd7eb623bd45 to your computer and use it in GitHub Desktop.
Save oofnivek/b8f959ebe701f79069a2cd7eb623bd45 to your computer and use it in GitHub Desktop.
package com.example.demo;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.util.concurrent.TimeUnit;
@Configuration
public class CacheStoreBeans {
@Bean
public CacheStore<Book> bookCache() {
return new CacheStore<Book>(5, TimeUnit.SECONDS);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment