Hello Everyone,
I am working on merging my codebase with the new able gold R8 update. I am not familiar with NHibernate so when it is being used in the category conlib pages, is it doing anything for those pages? Or is it "preloading" the data into a cache for when someone clicks to a product page from that category page? Because I see it "fetching" various stuff like "productOptions", "productKitComponents", "productTemplates", etc which aren't used on the category pages.
Thanks,
Ryan
Question about NHibernate
Question about NHibernate
Ryan A.
Scott's Bait and Tackle
http://store.scottsbt.com
Work In Progress
Able Gold R10
Bootstrap 3.3
Scott's Bait and Tackle
http://store.scottsbt.com
Work In Progress
Able Gold R10
Bootstrap 3.3
Re: Question about NHibernate
Hi Ryan,
I've asked a developer to look into this for you. In the change log, there is a feature "Use Eager Fetch on retail side when loading products", but you make a valid point about why we are preloading product options, kit components, etc. We should have an answer by tomorrow morning.
Thanks for your patience.
Katie
I've asked a developer to look into this for you. In the change log, there is a feature "Use Eager Fetch on retail side when loading products", but you make a valid point about why we are preloading product options, kit components, etc. We should have an answer by tomorrow morning.
Thanks for your patience.
Katie
Thank you for choosing AbleCommerce!
http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support
http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support
Re: Question about NHibernate
Thank you Katie for the quick response. Look forward to their answer.
Thanks,
Ryan
Thanks,
Ryan
Ryan A.
Scott's Bait and Tackle
http://store.scottsbt.com
Work In Progress
Able Gold R10
Bootstrap 3.3
Scott's Bait and Tackle
http://store.scottsbt.com
Work In Progress
Able Gold R10
Bootstrap 3.3
Re: Question about NHibernate
Ryan is right about fetching related product data from database for all category pages. The data is pre-fetched/loaded from database and cached by nhibernate before rendering products information at category pages, this data is later used by different controls (e.g. ~/ConLib/ProductPrice.ascx, ~/ConLib/ProductItemDisplay.ascx etc.). We do this for performance boost, so that instead querying database for one product at a time we load all related data in one go. This saves multiple database access round trips.
Thanks for your support
Naveed Ashraf
.com
AbleCommerce Help Center
AbleCommerce Developer WIKI
Follow us on Twitter
Naveed Ashraf
.com
AbleCommerce Help Center
AbleCommerce Developer WIKI
Follow us on Twitter
Re: Question about NHibernate
Thank you for your answer Naveed. That is a pretty neat feature. But now I have another question, lol. The data that is NHibernate is accessing/caching, is that for use only by that user that is browsing that category? Or is the cache used by other browsing people too? And is the cache timeout a relatively short one that won't interfere with daily product updates?
Thank you for your time,
Ryan
Thank you for your time,
Ryan
Ryan A.
Scott's Bait and Tackle
http://store.scottsbt.com
Work In Progress
Able Gold R10
Bootstrap 3.3
Scott's Bait and Tackle
http://store.scottsbt.com
Work In Progress
Able Gold R10
Bootstrap 3.3
Re: Question about NHibernate
The data is cached/fetched only for current nhibernate session. We usually use one session per http request, so you can safely assume it is cached for only one browser request. Next time the page is loaded, it will use a new nhibernate session and will again access the database.
Thanks for your support
Naveed Ashraf
.com
AbleCommerce Help Center
AbleCommerce Developer WIKI
Follow us on Twitter
Naveed Ashraf
.com
AbleCommerce Help Center
AbleCommerce Developer WIKI
Follow us on Twitter