Copied to clipboard

Flag this post as spam?

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


  • Daniel 6 posts 76 karma points
    Jul 19, 2016 @ 16:46
    Daniel
    0

    Merchello and multiple instances in Azure

    Hi Rusty,

    I am currently working in a Web project that runs under Umbraco 7. We have been able to install and customize Merchello (you've done an awesome work ;))

    We went live one month ago in Azure and we started to notice that some changes in Merchello back-office are not reflected in all the website instances. It seems each instance handles its own cache.

    While we were under development we were able to make the changes and see them reflected in other developer machines.

    I wonder if you have seen this scenario before. We basically have one master instance and two slaves. The idea is to make changes in the Master and see them reflected in the slaves machines.

    By the way this is working fine for Umbraco entities. Changes we make in the master back office are reflected in all instances.

    Any help will be very appreciated.

    Best, Daniel

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Jul 19, 2016 @ 22:32
    Rusty Swayne
    0

    Hi Daniel,

    I'm guessing that your running into an issue where we need to add cache refreshers to the Merchello.Core using the pattern Umbraco developed late last year / early this year -

    https://github.com/umbraco/Umbraco-CMS/tree/dev-v7/src/Umbraco.Web/Cache

    For products, invoices, customers, and orders we would also need to make certain the Examine indexes are updated on cache refresh (I think similar to the way Umbraco is doing their media but I've not looked at it in depth well enough to know for certain).

    This is has been an item on our v-next list for a few months but has not been designated as a priority to this point. It'd be a great pull request and something I'd be happy to help get into the core - but it's not something we can get into the next version as it's pretty far along.

  • Daniel 6 posts 76 karma points
    Jul 20, 2016 @ 03:12
    Daniel
    0

    Rusty,

    Thanks for reply!

    A quick question for you: What do you mean when you speak about the cache? What cache are you talking about? and how does it affect merchello?

    Thanks in advance, Daniel

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Jul 20, 2016 @ 15:16
    Rusty Swayne
    0

    Daniel,

    Merchello uses Umbraco's CacheHelper in it's repositories. It's basically the way Umbraco works internally minus some of their recent updates.

    ApplicationContext.Current.ApplicationCache

    https://github.com/Merchello/Merchello/blob/merchello-dev/src/Merchello.Core/Persistence/Repositories/MerchelloRepositoryBase.cs#L36

    I believe the way the cache refreshers work is they save instructions in the umbracoCacheInstruction table which is polled every few seconds and distributed to the other servers in the farm.

    Merchello also relies on service events to keep it's Examine (lucene) indexes up to date for products, customers, invoices and orders which will also need to be updated from within a respective cache refresher ... basically reindex an object or remove it from the index.

    The cache refreshers "look" pretty straight forward at a glance, I just have not had enough time to get them put into Merchello.

  • Kevin 35 posts 159 karma points
    Mar 07, 2017 @ 18:43
    Kevin
    0

    We have Merchello in a load balanced environment and we have just been bitten by this. We are considering having the index files in a shared location as a temporary fix, but it would be great to see Merchello use the umbracoCacheInstruction table. Are there any plans for this?

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Mar 07, 2017 @ 21:49
    Rusty Swayne
    0

    The cache refreshers have been looked at in fits and starts, but have no real traction to date. They are on the road map for V3 which depends on Umbraco V8. However, progress has slowed on the V3 version as we've coded as much as we feel is reasonable from what we've seen in Umbraco's dev-v8 branch (and some of the other temp branches) ...

    It would be great to get some help on these =)

  • Kevin 35 posts 159 karma points
    Mar 10, 2017 @ 11:40
    Kevin
    0

    I've looked at the cache refresher and think it might be quite complicated. To fix my issue quickly I have gone down the route of triggering a task on the slaves (the mechanics of which is a different topic).

    The task deletes items from the cache and rebuilds the index.

    // erase keys and modify index
    var guid = "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee";
    var slug = "my-url-slug";
    var sku = "product-sku";
    
    var keys = new[]
    {
        "IProduct." + guid,
        guid + ".Merchello.Web.Models.VirtualContent.IProductContent.True",
        guid + ".Merchello.Web.Models.VirtualContent.IProductContent.False",
        "merch.productcontent.slug." + slug + ".True",
        "merch.productcontent.slug." + slug + ".False",
        "merch.productcontent.sku." + sku + ".True",
        "merch.productcontent.sku." + sku + ".False"
    };
    keys.ForEach(key => ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheItem(key));
    
    var productIndexer = (ProductIndexer)ExamineManager.Instance.IndexProviderCollection["MerchelloProductIndexer"];
    
    productIndexer.RebuildIndex();
    

    Is there a way to remove just the product in question from the index without rebuilding the entire index?

  • Steve Borg 28 posts 99 karma points
    Sep 21, 2017 @ 10:03
    Steve Borg
    0

    We have just had an instance in our load balanced environment where a programmatic change to the extended content on one of our products resulted in the old data always being shown on the website. This was despite re-saving the product in Merchello in the back-office, rebuilding the Merchello product / Internal and External Examine indexes and recycling all the app pools.

    In the end I had to delete all the files in App_Data\TEMP\ExamineIndexes\Merchello\Product\Index from both of our front-end servers and recycle both app pools.

    Does anyone have any ideas why a simple app pool recycle did not do the trick?

    Thank you.

Please Sign in or register to post replies

Write your reply to:

Draft