/** * Get some number. * * @return The number */ @Cacheable(before = Bar.class) public long get() { return CacheableTest.RANDOM.nextLong(); }
/** * Download some text. * * @return Downloaded text */ @Cacheable(lifetime = 1, unit = TimeUnit.SECONDS, asyncUpdate = true) @Loggable(Loggable.DEBUG) public CacheableTest.Foo asyncGet() { return new CacheableTest.Foo(CacheableTest.RANDOM.nextLong()); }
/** * Download some text. * * @return Downloaded text */ @Cacheable(lifetime = 1, unit = TimeUnit.SECONDS) public static String staticGet() { return Long.toString(CacheableTest.RANDOM.nextLong()); }
/** * Download some text. * * @return Downloaded text */ @Cacheable(lifetime = 1, unit = TimeUnit.SECONDS) @Loggable(Loggable.DEBUG) public CacheableTest.Foo get() { return new CacheableTest.Foo(CacheableTest.RANDOM.nextLong()); }