WELCOME Abdennour : Software engineer

May 8, 2013

Jquery Template Clear Cache


Problem
I have the following code :

    var data = "<li><b>${a}</b> (${b})</li>";
    $.template( "compiledItem",data );

The instruction above is called "compilation of template" or "Caching a template " via jquerty template  using String value as a identifier. (String =>'compiledItem')

When i modify markup value, i want to clear the cache

  How Can i delete the template cache?

Solution


Add before compilation instruction the following instruction :

     delete $.template["compiledItem"];

9 comments:

  1. Wow. This really made my day. Thanks a lot!

    Wow. This really made my day. Thanks a lot!
    JQuery Training JQuery Training Javascript JQuery Online Training

    JQuery Online Training JQuery Online Training Javascript Online Training JQuery Training

    ReplyDelete

  2. Very Interesting information shared than other blogs
    Thanks for Sharing and Keep updating us

    ReplyDelete
  3. Thanks for sharing the info, keep up the good work going.... I really enjoyed exploring your site. good resource...
    Premium Whmcs templates

    ReplyDelete
  4. Thank you for sharing wonderful information with us to get some idea about that content. check it once through
    Machine Learning With TensorFlow Training and Course in Israel
    | CPHQ Online Training in Beirut. Get Certified Online

    ReplyDelete
  5. Good job in presenting the correct content with the clear explanation. The content looks real with valid information. Good Work

    DevOps is currently a popular model currently organizations all over the world moving towards to it. Your post gave a clear idea about knowing the DevOps model and its importance.

    Good to learn about DevOps at this time.
    DevOps Training in Chennai

    DevOps Course in Chennai

    ReplyDelete