Forrest
  1. Forrest
  2. FOR-1031

Switch to EHCache for Locationmap Cache

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9
    • Component/s: Locationmap
    • Labels:
      None

      Description

      Should be an easy switch and get much better cache support/configuration options. Expiry of cache can be per-element vs. the current implementation where it expires in its entirey. It will make the LM stuff much cleaner too.
      1. lm_cache.diff
        4 kB
        Tim Williams

        Activity

        Hide
        Tim Williams added a comment -
        r834295 applies the patch that adds ehcache and the config file to get rid of the warning. We'll consider this done and address any side effects in their own issue.
        Show
        Tim Williams added a comment - r834295 applies the patch that adds ehcache and the config file to get rid of the warning. We'll consider this done and address any side effects in their own issue.
        Hide
        David Crossley added a comment -
        Fixed those unrelated issues. See Tim's comments at:
         Re: Cache error invalid stream header
         http://thread.gmane.org/gmane.text.xml.forrest.devel/26992

        i.e. Needed to remove Cocoon's cache:
         cd $java.io.tmpdir (e.g. /tmp)
         rm cocoon-ehcache*
        Show
        David Crossley added a comment - Fixed those unrelated issues. See Tim's comments at:  Re: Cache error invalid stream header   http://thread.gmane.org/gmane.text.xml.forrest.devel/26992 i.e. Needed to remove Cocoon's cache:  cd $java.io.tmpdir (e.g. /tmp)  rm cocoon-ehcache*
        Hide
        David Crossley added a comment -
        I am seeing some issues now.

        In the PDF output plugin, building its own little website.
        (Also saw this with site-author.)

        Did 'forrest clean; forrest run' all okay.

        Then did 'forrest' to build the "site".
        Got one error:
        --------
        ERROR - cocoon-ehcache-1Cache: Could not read disk store element for key PK_R-resource-file:///svn/asf/forrest/main/webapp/skins/pelt/images/instruction_arrow.png. Error was invalid stream header
        java.io.StreamCorruptedException: invalid stream header
                at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:764)
                at java.io.ObjectInputStream.<init>(ObjectInputStream.java:277)
                at net.sf.ehcache.store.DiskStore$1.<init>(DiskStore.java:272)
                at net.sf.ehcache.store.DiskStore.loadElementFromDiskElement(DiskStore.java:267)
        ...
        --------

        Then did 'forrest run' again and request index.html
        Got two errors:
        --------
        ERROR - cocoon-ehcache-1Cache: Could not read disk store element for key PK_G-file-file:///svn/asf/forrest/plugins/org.apache.forrest.plugin.output.pdf/src/documentation/content/xdocs/tabs.xml_T-xinclude-XInclude. Error was invalid stream header
        ...
        ERROR - cocoon-ehcache-1Cache: Could not read disk store element for key PK_G-file-cocoon://abs-linkmap?pipelinehash=-4182989005625245977_T-xslt-file:///svn/asf/forrest/main/webapp/resources/stylesheets/relativize-linkmap.xsl;site-root=;path=index.html. Error was invalid stream header
        --------

        Subsequent requests for index.html yielded no errors.
        Requests for other pages also yielded no errors.

        Request index.pdf
        Got one error:
        --------
        ERROR - cocoon-ehcache-1Cache: Could not read disk store element for key PK_G-module-properties. Error was invalid stream header
        --------

        Then did 'forrest' again.
        No errors.

        Then did 'forrest run' again.
        Request index.html
        Got one error:
        --------
        ERROR - cocoon-ehcache-1Cache: Could not read disk store element for key PK_G-file-file:///svn/asf/forrest/plugins/org.apache.forrest.plugin.output.pdf/src/documentation/content/xdocs/tabs.xml_T-xinclude-XInclude. Error was invalid stream header
        --------

        Subsequent requests for various docs are all okay.

        Then did 'forrest' again.
        No errors.

        Then did 'forrest' again, yes did 'forrest' again.
        Got one error:
        --------
        ERROR - cocoon-ehcache-1Cache: Could not read disk store element for key PK_G-file-file:///svn/asf/forrest/plugins/org.apache.forrest.plugin.output.pdf/src/documentation/content/xdocs/tabs.xml_T-xinclude-XInclude. Error was invalid stream header
        --------

        Same on every subsequest 'forrest'.

        Can repeat all that behaviour after another 'forrest clean'.

        For each session after the first, there is only one broken cache request.
        Always tabs.xml_T-xinclude-XInclude.
        The first 'forrest' after a 'forrest run' is okay. Subsequent invocations have that single cache error.
        Show
        David Crossley added a comment - I am seeing some issues now. In the PDF output plugin, building its own little website. (Also saw this with site-author.) Did 'forrest clean; forrest run' all okay. Then did 'forrest' to build the "site". Got one error: -------- ERROR - cocoon-ehcache-1Cache: Could not read disk store element for key PK_ R-resource-file:///svn/asf/forrest/main/webapp/skins/pelt/images/instruction_arrow.png . Error was invalid stream header java.io.StreamCorruptedException: invalid stream header         at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:764)         at java.io.ObjectInputStream.<init>(ObjectInputStream.java:277)         at net.sf.ehcache.store.DiskStore$1.<init>(DiskStore.java:272)         at net.sf.ehcache.store.DiskStore.loadElementFromDiskElement(DiskStore.java:267) ... -------- Then did 'forrest run' again and request index.html Got two errors: -------- ERROR - cocoon-ehcache-1Cache: Could not read disk store element for key PK_ G-file-file:///svn/asf/forrest/plugins/org.apache.forrest.plugin.output.pdf/src/documentation/content/xdocs/tabs.xml_T-xinclude-XInclude . Error was invalid stream header ... ERROR - cocoon-ehcache-1Cache: Could not read disk store element for key PK_ G-file-cocoon://abs-linkmap?pipelinehash=-4182989005625245977_T-xslt-file:///svn/asf/forrest/main/webapp/resources/stylesheets/relativize-linkmap.xsl;site-root=;path=index.html . Error was invalid stream header -------- Subsequent requests for index.html yielded no errors. Requests for other pages also yielded no errors. Request index.pdf Got one error: -------- ERROR - cocoon-ehcache-1Cache: Could not read disk store element for key PK_G-module-properties. Error was invalid stream header -------- Then did 'forrest' again. No errors. Then did 'forrest run' again. Request index.html Got one error: -------- ERROR - cocoon-ehcache-1Cache: Could not read disk store element for key PK_ G-file-file:///svn/asf/forrest/plugins/org.apache.forrest.plugin.output.pdf/src/documentation/content/xdocs/tabs.xml_T-xinclude-XInclude . Error was invalid stream header -------- Subsequent requests for various docs are all okay. Then did 'forrest' again. No errors. Then did 'forrest' again, yes did 'forrest' again. Got one error: -------- ERROR - cocoon-ehcache-1Cache: Could not read disk store element for key PK_ G-file-file:///svn/asf/forrest/plugins/org.apache.forrest.plugin.output.pdf/src/documentation/content/xdocs/tabs.xml_T-xinclude-XInclude . Error was invalid stream header -------- Same on every subsequest 'forrest'. Can repeat all that behaviour after another 'forrest clean'. For each session after the first, there is only one broken cache request. Always tabs.xml_T-xinclude-XInclude. The first 'forrest' after a 'forrest run' is okay. Subsequent invocations have that single cache error.
        Hide
        David Crossley added a comment -
        See some discussion on the dev list in response to this issue:
        http://thread.gmane.org/gmane.text.xml.forrest.devel/24814/focus=26924
        Show
        David Crossley added a comment - See some discussion on the dev list in response to this issue: http://thread.gmane.org/gmane.text.xml.forrest.devel/24814/focus=26924
        Hide
        Tim Williams added a comment -
        Remove the simple all-or-nothing map cache for ehache.
        Show
        Tim Williams added a comment - Remove the simple all-or-nothing map cache for ehache.

          People

          • Assignee:
            Tim Williams
            Reporter:
            Tim Williams
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development