Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

looking for some caching design patterns

 
Meir Yan
Ranch Hand
Posts: 599
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello all , im not sure its the right place to ask put i will try
i need to build some kind of caching mechanism in the web tire level
to cache html component objects my scenario in short :
i have 2 types of objects one is simple and one is complex
the difference between them that the complex object is construct from number of
simple objects , i need to build some kind of simple caching mechanism that can handle both
can some one please direct me to some kind of link or tutorial or some kind of
direction?

thanks allot
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A cache is probably just a map using a key to get to an object. The object can be anything - your simple case and complex case ought to work exactly the same. Is there some other difference in how you handle the two cases?
 
Meir Yan
Ranch Hand
Posts: 599
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no im still in the design phase and some general coding .
still 2 object one simple and one complex like i said , there is something that called
service locate pattern can it be good design pattern for my scenario?
one more thing , problem i have i dont know how to make this cache recognize
if some object has bean changed even if it cached how can i refresh the object ?
is there also pattern for that ?
 
steve souza
Ranch Hand
Posts: 862
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look into some of the already existing cache implementations first...

http://java-source.net/open-source/cache-solutions
http://www.manageability.org/blog/stuff/distributed-cache-java/view
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic