Message Boards

View Count is taking time to update in AssetEntry table

Ronak Parekh, modified 3 Years ago.

View Count is taking time to update in AssetEntry table

Junior Member Posts: 76 Join Date: 4/6/15 Recent Posts
Hello,We have requirement to display most viewed web content with attached asset tag based on view count of page. I am simply using Web Content Display portlet to increment view counter of asset entry(enabling view counter increment from configuration of web content display portlet) of that web content whenever page containing that web content display portlet gets refresh. 
And I am fetching that view count to display most viewed Web Content Article of particular attached asset tag. Now I am facing weird issue in my lower environment, when i refresh page containing web content display portlet it takes some time to update view count in AssetEntry table. Is there any body is facing this type of issue?We are using Liferay Dxp 7.2 ga1. Please help.
thumbnail
Olaf Kock, modified 3 Years ago.

RE: View Count is taking time to update in AssetEntry table

Liferay Legend Posts: 6403 Join Date: 9/23/08 Recent Posts
Ronak Parekh:

And I am fetching that view count to display most viewed Web Content Article of particular attached asset tag. Now I am facing weird issue in my lower environment, when i refresh page containing web content display portlet it takes some time to update view count in AssetEntry table. Is there any body is facing this type of issue?We are using Liferay Dxp 7.2 ga1.

Sounds like it's cached. Are you on a cluster? Or: It might be cached by design and only reloaded after some timeout. View counts often are out of sync in many systems, only eventually correct. It's typically more important to deliver the correct content, rather than to-the-second-accurate view counts.
But that's just educated rambling - I'm not sure what causes the behavior you observe.
Ronak Parekh, modified 3 Years ago.

RE: View Count is taking time to update in AssetEntry table

Junior Member Posts: 76 Join Date: 4/6/15 Recent Posts
Thank you Olaf Kock for your response. No it is not cluster environment.
Is there any OOTB functionality for displaying most viewed page containing particular web content?  Or should we go for custom module approach?
thumbnail
Christoph Rabel, modified 3 Years ago.

RE: View Count is taking time to update in AssetEntry table

Liferay Legend Posts: 1554 Join Date: 9/24/09 Recent Posts
I believe you can use an Asset Publisher and configure the sort option to use the view count. (Did not test it though) It might even work always there since it could take the view count from memory instead of the database.