Code example for LruCache

	private final TimeLimitedCache<List<PodcastChannel>> cachedPodcastChannels = new TimeLimitedCache<List<PodcastChannel>>(10 * 3600, TimeUnit.SECONDS);
    private String restUrl;
    public CachedMusicService(MusicService musicService) {
        this.musicService = musicService;
        cachedMusicDirectories = new LruCache<String, TimeLimitedCache<MusicDirectory>>(MUSIC_DIR_CACHE_SIZE);
    public void ping(Context context, ProgressListener progressListener) throws Exception {
        checkSettingsChanged(context);, progressListener);
    public boolean isLicenseValid(Context context, ProgressListener progressListener) throws Exception {
        Boolean result = cachedLicenseValid.get();
        if (result == null) {
            result = musicService.isLicenseValid(context, progressListener);
Connect your IDE to all the code out there  Get Codota for Java