I refer to the GAE/J-specific post in the GAE group of the same name
of link:
http://groups.google.com/group/google-appengine/browse_thread/thread/3a4789840571c173#
Your line
HashMap userMap = (HashMap)_cache.get(user.getInstance());
involves casting a javax.cache to a java.util.HashMap. B
I just realised that the MemcacheService is not a singleton because
you can set a namespace and error handler for each instance. Sorry
about that!
On 5 Feb 2010, at 02:11, Ikai L (Google) wrote:
John means you don't have to worry about "synchronized", but be
aware of Memcache race condit
Actually I don't mean to be misleading you do need to think about
concurrency for shared objects like static variables. But not the
memcache service.
On 4 Feb 2010, at 22:00, Fux wrote:
Hi everyone!
I have a question, are there any good examples of how Memcache should
be used in a rea
John means you don't have to worry about "synchronized", but be aware of
Memcache race conditions if you do frequent reads and saves from Memcache.
You can't lock Memcache.
On Thu, Feb 4, 2010 at 11:06 AM, John Patterson wrote:
> You don't need to worry about concurrency in your code - you cannot
You don't need to worry about concurrency in your code - you cannot
use multiple threads.
The MemcacheService is already a singleton accessible with the
MemcacheServiceFactory so no need to make another. Personally I
inject a single MemcacheService instance into my objects with Guice.
B
Hi everyone!
I have a question, are there any good examples of how Memcache should
be used in a real world case?
I mean, where should a cache be created?
If I created a Cache for caching some data used by a servlet, should I
create and store the instance in the servlet context on init or just
ma