Copied to clipboard

Flag this post as spam?

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


  • Alex Skrypnyk 6148 posts 24097 karma points MVP 8x admin c-trib
    Sep 07, 2016 @ 21:42
    Alex Skrypnyk
    0

    Caching with Umbraco

    Hello Community,

    We have big issue with caching a lot of data in the custom xml files. Xml files because we have 20-30 instances of application and cache is between these instances.

    Problem is when few instances tries to rebuild xml cache at the same time.

    What is the soultion for such problems?

    Some ideas would be great !!!

    Thanks,

    Alex

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Sep 09, 2016 @ 19:28
    Dan Diplo
    100

    Sounds like you need to create some kind of locking mechanism. One of the simplest ways is to simply create a .lock file in alongside the XML file when it is being written to, and then remove it once the write has finished. Then in your code you can check whether the lock is present before writing. and if it is wait. until it is freed.

  • Alex Skrypnyk 6148 posts 24097 karma points MVP 8x admin c-trib
    Sep 10, 2016 @ 09:43
    Alex Skrypnyk
    0

    Hi Dan,

    Thank you, great idea. We will use it.

Please Sign in or register to post replies

Write your reply to:

Draft