<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Home</title><link>https://sourceforge.net/p/cachelet/wiki/Home/</link><description>Recent changes to Home</description><atom:link href="https://sourceforge.net/p/cachelet/wiki/Home/feed" rel="self"/><language>en</language><lastBuildDate>Sat, 13 Feb 2016 01:55:37 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/cachelet/wiki/Home/feed" rel="self" type="application/rss+xml"/><item><title>Home modified by Alan N. Lohse</title><link>https://sourceforge.net/p/cachelet/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v4
+++ v5
@@ -59,7 +59,8 @@
 2. by limiting the number of objects on memory;
 3. by providing a expiration policy.

-In this first example I'll set a clean interval, it's the time that the algorithm will check the objects on cache.
+In this first example I'll set a clean interval, it's the time that the algorithm will check the objects on cache. There's something important when we setup a cleaning algorithm, a parallel thread will be created for each cleaner.
+
 ~~~java

        Cache&amp;lt;String,Integer&amp;gt; cache = factory.buildCache()
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alan N. Lohse</dc:creator><pubDate>Sat, 13 Feb 2016 01:55:37 -0000</pubDate><guid>https://sourceforge.net136e306541068dd408e12204ede9c454c4bf69e2</guid></item><item><title>Home modified by Alan N. Lohse</title><link>https://sourceforge.net/p/cachelet/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v3
+++ v4
@@ -51,7 +51,28 @@

 ~~~

+## Cleaning old objects ##

+Objects that stood long in the cache without use, can be removed using cleaning algorithms. The most common are LRU (Least Recently Used) and LFU (Least Frequently Used) and Cachelet have both implemented (having enough time I'll create more).
+There are some ways to tell Cachelet that objects should be removed: 
+1. by providing an expiration time; 
+2. by limiting the number of objects on memory;
+3. by providing a expiration policy.
+
+In this first example I'll set a clean interval, it's the time that the algorithm will check the objects on cache.
+~~~java
+
+       Cache&amp;lt;String,Integer&amp;gt; cache = factory.buildCache()
+                .setObjectFactory(myObjectFactory)
+               .setExpireTime(0)
+               .setCleanInterval(500L)
+               .setMaxObjectsOnMemory(20)
+               .setCleanAlgorithm(Cache.LFU)
+               .build();
+                
+~~~
+
+Very easy, isn't it?

 [[members limit=20]]
 [[download_button]]
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alan N. Lohse</dc:creator><pubDate>Sat, 13 Feb 2016 01:52:01 -0000</pubDate><guid>https://sourceforge.net1cd6bccb2e39f67fb136d62c84d57425de422c79</guid></item><item><title>Home modified by Alan N. Lohse</title><link>https://sourceforge.net/p/cachelet/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -21,5 +21,37 @@
        cache.get(1);
 ~~~

+
+## Building a cache ##
+
+There's a easy way to configure a cache. Using the builder you can easily change all properties without need to know property keys. And methods have very intuitive names.
+
+~~~java
+        CacheFactory factory = CacheFactory.createCacheFactory();
+        Cache&amp;lt;String,User&amp;gt; cache = factory.buildCache()
+               .setMaxObjectsOnMemory(20)
+               .build();
+             
+~~~
+
+## Cache with object factory ##
+
+The cached objects can be created as they are needed and you don't have to worry about putting things on cache. The way it canbe done is by using an object factory.
+
+~~~java
+        ObjectFactory&amp;lt;String,User&amp;gt; myObjectFactory = new ObjectFactory&amp;lt;String,User&amp;gt;() {
+                   public User create(String key) {
+                       return findOnDatabase((String)key);
+                   }
+               };
+                
+        Cache&amp;lt;String,User&amp;gt; cache = factory.buildCache().setObjectFactory(myObjectFactory)
+               .setMaxObjectsOnMemory(20)
+               .build();
+
+~~~
+
+
+
 [[members limit=20]]
 [[download_button]]
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alan N. Lohse</dc:creator><pubDate>Sat, 13 Feb 2016 01:23:47 -0000</pubDate><guid>https://sourceforge.netbf30cca6a1be6c0fa9c9d53075fadba877edec7e</guid></item><item><title>Home modified by Alan N. Lohse</title><link>https://sourceforge.net/p/cachelet/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -1,8 +1,25 @@
-Welcome to your wiki!
+![](https://sourceforge.net/p/cachelet/icon?2016-02-13%2000:23:09+00:00)

-This is the default page, edit it as you see fit. To add a new page simply reference it within brackets, e.g.: [SamplePage].
+# Cachelet #
+version 1.0.0_b1

-The wiki uses [Markdown](/p/cachelet/wiki/markdown_syntax/) syntax.
+Cachelet is a cache framework created thinking on the simplest way of caching. So it is very easy to use.
+
+## Start caching ##
+
+The example below shows how to create a read and write cache.
+
+~~~java
+        CacheFactory factory = CacheFactory.createCacheFactory();
+       Cache&amp;lt;Integer, String=""&amp;gt; cache = factory.createCache();
+       // first populate some values
+       cache.put(Integer.valueOf(1), "One");       
+       cache.put(Integer.valueOf(20), "Twenty");       
+       cache.put(Integer.valueOf(300), "Three hundred");       
+       cache.put(Integer.valueOf(4123), "Four thousand one hundred and twenty three");
+       // get the values
+       cache.get(1);
+~~~

 [[members limit=20]]
 [[download_button]]
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alan N. Lohse</dc:creator><pubDate>Sat, 13 Feb 2016 01:11:29 -0000</pubDate><guid>https://sourceforge.net21d05a349682ee718f562db2ac169a636978708e</guid></item><item><title>Discussion for Home page</title><link>https://sourceforge.net/p/cachelet/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;img alt="" src="https://sourceforge.net/p/cachelet/icon?2016-02-13%2000:23:09+00:00"/&gt;&lt;/p&gt;
&lt;h1 id="cachelet"&gt;Cachelet&lt;/h1&gt;
&lt;p&gt;version 1.0.0_b1&lt;/p&gt;
&lt;p&gt;Cachelet is a cache framework created thinking is the simplest way of cache. So it is very easy to use.&lt;/p&gt;
&lt;h2 id="start-caching"&gt;Start caching&lt;/h2&gt;
&lt;p&gt;The example below shows how to create a read and write cache.&lt;/p&gt;
&lt;p&gt;:::java&lt;br/&gt;
        Cache&amp;lt;Integer, String=""&amp;gt; cache = factory.createCache();&lt;br/&gt;
        // first populate some values&lt;br/&gt;
        cache.put(Integer.valueOf(1), "One");     &lt;br/&gt;
        cache.put(Integer.valueOf(20), "Twenty");     &lt;br/&gt;
        cache.put(Integer.valueOf(300), "Three hundred");     &lt;br/&gt;
        cache.put(Integer.valueOf(4123), "Four thousand one hundred and twenty three");&lt;br/&gt;
        // get the values&lt;br/&gt;
        cache.get(1);&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alan N. Lohse</dc:creator><pubDate>Sat, 13 Feb 2016 01:02:57 -0000</pubDate><guid>https://sourceforge.net6051f9fc5f07db52273679d426baf7ff27273e39</guid></item><item><title>Home modified by Alan N. Lohse</title><link>https://sourceforge.net/p/cachelet/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Welcome to your wiki!&lt;/p&gt;
&lt;p&gt;This is the default page, edit it as you see fit. To add a new page simply reference it within brackets, e.g.: &lt;span&gt;[SamplePage]&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;The wiki uses &lt;a class="" href="/p/cachelet/wiki/markdown_syntax/"&gt;Markdown&lt;/a&gt; syntax.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;h6&gt;Project Members:&lt;/h6&gt;
	&lt;ul class="md-users-list"&gt;
		&lt;li&gt;&lt;a href="/u/alanlohse/"&gt;Alan N. Lohse&lt;/a&gt; (admin)&lt;/li&gt;
		
	&lt;/ul&gt;&lt;br/&gt;
&lt;p&gt;&lt;span class="download-button-56be6d9c1be1ce059457597e" style="margin-bottom: 1em; display: block;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alan N. Lohse</dc:creator><pubDate>Fri, 12 Feb 2016 23:41:16 -0000</pubDate><guid>https://sourceforge.net130bf854fe1ffb442a69d964f2a382a8ef797c29</guid></item></channel></rss>