Caching with dynamic proxy classes

In my last post I used AspectJ to implement a cache that stored the returned result of methods with a special annotation (@Cachable). If you can’t use AspectJ you may want to use a dynamic proxy class: in this post I’ll present a solution for this.

You can download the Eclipse project as a tar or zip file or view the code online here.

Continue reading →

Caching with AspectJ

In my last post I presented a very simple cache that stores objects. Now I want to use this cache with AspectJ in a small sample application.

You can download the Eclipse project as a tar or zip file or browse the code online here.

Continue reading →

Implementing a simple cache with Java

In this post I’ll present a simple cache written in Java. It can be used to store objects of any kind or specific types only. The objects will expire after a certain time that can be customized too. Since this cache is really simple I didn’t implement a caching strategy nor an option for a maximum capacity.

You can download the Eclipse project as tar or zip or browse the code online here.

Continue reading →