caching - 2-level cache implementation in Java -


i'm working on 2-level cache implementation in java studying purpose. have 2 levels: ram first , fs second. chose lru strategy implementation , "write-back" policy between 2 levels. please clarify:

is possible make objects stored in 2nd level (file system) up-to-date in case when object changes internal state? normal practise 2-level cache?

how can write object (serialize) file in binary form if know object object object type? possible or have make requirment object should implement serializable?

edit:

actually question internal state - how can impelment it?

yea can normal practice have 2nd level cache in application @ least can on basis of experience. more can refer java specs here.

we implemented 2nd level cache in our application enhance performance in database read operations. achieve used ehcache api , found easier integrate spring in our application running on spring framework.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -