Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-5474

Do not save documents in the cache when they are being saved to the database.

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 2.5 M2
    • 2.5 M1
    • Storage
    • None
    • Easy

    Description

      from mail:

      There are 2 reasons I want to stop caching documents when they are stored.

      1. Coherence, it should be impossible for the cache to have a different entry than the store. Suppose a document is stored and the storage fails without throwing any error, the document will appear to be stored correctly until the cache is purged. Another more likely scenario is that the document loaded from the store is slightly different than the document saved to the store and thus the cache will be lying.

      2. Performance, when an attachment is added to a document, the document contains all of the attachment's content. My analysis tells me switching to holding the content with a soft reference would be quite complex and proving that nothing depends on the attachment content not being null is very difficult.
      The proposed change will prevent the attachment content from ever being stored in the cache and provide an improvement in allowable cache capacity and memory footprint.

      http://lists.xwiki.org/pipermail/devs/2010-September/019765.html

      Attachments

        Activity

          People

            calebjamesdelisle CalebJamesDeLisle
            calebjamesdelisle CalebJamesDeLisle
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: