Fórumok

How to check user custom attribute retrieval hits DB every time or not

thumbnail
Nagendra Kumar Busam, módosítva 9 év-val korábban

How to check user custom attribute retrieval hits DB every time or not

Liferay Master Bejegyzések: 678 Csatlakozás dátuma: 2009.07.07. Legújabb bejegyzések
In one of my jsp I am trying to invoke below method, is it going to hit DB every time I call (I made that custom attribute indexable though). How can I cross check the whether it is hitting or not

String myCustomAttr = (String)user.getExpandoBridge().getAttribute("my-custom-attribute", false);



Thanks.
siddhant jain, módosítva 9 év-val korábban

RE: How to check user custom attribute retrieval hits DB every time or not

Junior Member Bejegyzések: 69 Csatlakozás dátuma: 2013.03.19. Legújabb bejegyzések
Hi Nagendra Kumar,
To check if it is calling DB on every hit, you can update the value directly in the DB and check if the change is reflected on portal or not. If the change is reflected then it is accessing the DB and if the change is not reflected then the value is coming from the Cache.


thanks
Siddhant
thumbnail
Nagendra Kumar Busam, módosítva 9 év-val korábban

R: How to check user custom attribute retrieval hits DB every time or not

Liferay Master Bejegyzések: 678 Csatlakozás dátuma: 2009.07.07. Legújabb bejegyzések
Without manipulating DB if there is any way to check I am looking that route. I will give it a try for your suggestion though

Thanks.

Sent from my iPhone with Liferay.com Forums