search

Home  >  Q&A  >  body text

javascript - Ask about the synchronization update of paging cache?

Now in a library project, my students’ notes are loaded in the form of paging ajax, but now I have encountered a problem in synchronizing cache updates. I would like to ask all netizens for advice.

For example, when a student deletes an article, I need to update the cache in the paging at the same time. Because it is loaded in the form of ajax, there is a problem with the interaction between the front and back ends.

It seems that it is not clearly stated, that is, when a user deletes a note, how do I know which page the note belongs to? I have thought of some solutions myself, but it will take some time to change a lot of front-end code. Can any netizens give some suggestions?

p.s: The business is not that simple. For example, when a user browses a note alone, there is no statistical pagination information.


The problem has been solved, I recommend the previous article on quora -> https://www.quora.com/Why-doe...

Actually, my questions are more about the details of the business, and have little to do with the above article. I recommend friends who do caching to read it.

phpcn_u1582phpcn_u15822709 days ago891

reply all(4)I'll reply

  • 漂亮男人

    漂亮男人2017-06-23 09:16:39

    You can check this out: http://bbs.csdn.net/topics/39...

    reply
    0
  • 过去多啦不再A梦

    过去多啦不再A梦2017-06-23 09:16:39

    Questioner, you have asked this question before, but I don’t know what the final solution is. If you use an external index, then when you delete a note, you don’t need to care about which page. You can just delete the note and delete the relationship at the same time. There is no need to create a cache for relationships.

    reply
    0
  • 过去多啦不再A梦

    过去多啦不再A梦2017-06-23 09:16:39

    The problem has been solved, I recommend the previous article on quora -> https://www.quora.com/Why-doe...

    Actually, my questions are more about the details of the business and have little to do with the above article. I recommend friends who do caching to read it.

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-06-23 09:16:39

    Don’t you know which page it belongs to when making an ajax request on the front end?

    reply
    0
  • Cancelreply