Why use your application-level cache if database already provides caching?

Because to get the data from the database’s cache, you still have to: Generate the SQL from the ORM’s “native” query format Do a network round-trip to the database server Parse the SQL Fetch the data from the cache Serialise the data to the database’s over-the-wire format Deserialize the data into the database client library’s … Read more

Using Spring cache annotation in multiple modules

Use this class: http://static.springsource.org/autorepo/docs/spring/3.2.0.M1/api/org/springframework/cache/support/CompositeCacheManager.html like this: <cache:annotation-driven cache-manager=”cacheManager” /> <bean id=”cacheManager” class=”org.springframework.cache.support.CompositeCacheManager”> <property name=”cacheManagers”> <array> <ref bean=”cacheManager1″ /> <ref bean=”cacheManager2″ /> </array> </property> <property name=”addNoOpCache” value=”true” /> </bean>

.NET 4 Caching Support

I assume you are getting at this, System.Runtime.Caching, similar to the System.Web.Caching and in a more general namespace. See http://deanhume.com/Home/BlogPost/object-caching—-net-4/37 and on the stack, is-there-some-sort-of-cachedependency-in-system-runtime-caching and, performance-of-system-runtime-caching. Could be useful.

Why use System.Runtime.Caching or System.Web.Caching Vs static variables?

First of all, Xaqron makes a good point that what you’re talking about probably doesn’t qualify as caching. It’s really just a lazily-loaded globally-accessible variable. That’s fine: as a practical programmer, there’s no point bending over backward to implement full-on caching where it’s not really beneficial. If you’re going to use this approach, though, you … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)