db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "thomas.ung@freesbee.fr" <thomas....@freesbee.fr>
Subject Re: torque and caching
Date Wed, 28 Mar 2007 19:21:09 GMT
Hi,

I have one last question about caching... Supposing that I
have a table identified by a PK and an UniqueName. I need
two mathods in the cache manager to get the instance:
    - getInstance(Integer pk) is out of the box: nothing to
do. great!
    - getInstanceByName(String uniqueName) needs to be
implemented:

...
	Object obj = getMethodResult().get(OBJ.class,
"getInstanceByName", name );
	if( obj == null ) {
	...
	getMethodResult().put( obj, OBJ.class, "getInstanceByName",
name );
	...
	}

Supposing that getInstance(integer) and
getInstanceByName(uniqueName) got used in the same time. Do
they return the same instance? or two different ones?

The reason of this question is to ensure the data consistancy.

Thank You again!
Thomas



------------------------ ALICE C'EST ENCORE MIEUX AVEC CANAL+ LE BOUQUET ! ---------------
Découvrez vite l'offre exclusive ALICEBOX et CANAL+ LE BOUQUET, en cliquant ici http://alicebox.fr
Soumis à conditions.



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message