Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Johan Larsson 28 posts 98 karma points
    Jan 28, 2015 @ 13:55
    Johan Larsson
    0

    How to get products from cache?

    It seems that every time I get an product from uCommerce programmatically it always goes to the database and gets the product. How to get a product from cache? Is that possible or do I have to implement an own cache code for this?

  • Jesper Nielsen 141 posts 498 karma points
    Jan 29, 2015 @ 10:21
    Jesper Nielsen
    1

    The nHibernate cahce should be in place, unless you specifically deactiveted it.

    If you use Product.Get(myId), you should hit the first level cache.
    Other requests should hit the second level cache.

    The cache by default holds items for 3600 seconds = 1 hour. This can be configured in web.config in the <syscache> section. 

    Kind regards,
    Jesper 

  • Søren Spelling Lund 1797 posts 2786 karma points
    Jan 29, 2015 @ 15:43
    Søren Spelling Lund
    100

    Hi Johan,

    Versions prior to 6.5 would cache most of the data retrieved from the database including the object itself as Jesper says, but 1-n relationships would always refresh the relationship from the database, e.g. product - variants.

    Some aspects in uCommerce are not cached at all; primarily in the transaction sytem where orders, order lines, and things of that nature are always the most up to date information.

    Could you let us know which version of uCommerce you're using and what the specific API in question is?

    Hope this helps.

  • Johan Larsson 28 posts 98 karma points
    Feb 03, 2015 @ 20:38
    Johan Larsson
    0

    Thank you!

    I am using uCommerce 6.1.0.14195 and here is some specific calls I do that I am wondering if it will be cached.

    - UCommerce.EntetiesV2.Product.Find(p => p ....)

    - SiteContext.Current.CatalogContext.CurrentCatalog.Categories

     

  • higgsy 65 posts 92 karma points
    Apr 28, 2015 @ 00:13
    higgsy
    0

    Was there ever a response to this?

Please Sign in or register to post replies

Write your reply to:

Draft