Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Feedback Requested] Simple Caching model – HIGHLY EFFECTIVE

  • I believe I have a simple but highly effective fix.

    Since the vast majority of forum traffic is for non-logged in users AND, since the only time a forum page changes is if a POST is made … why not implement a very basic disk caching system that caches the content for the FrontPage and Topic page for non-logged in users.

    Here is the pseudo code:

    // Front page


    if (not logged in)

    …….. serve disk cache

    …………….if (disk cache not present)

    ……………………generate page and save to disk

    else (logged in user)

    ……..generate page (PHP)

    // Topic page


    if (not logged in)

    ……..serve disk cache

    ……..if (disk cache not present)

    …………….generate page and save to disk

    else (logged in user)

    ……..generate page (PHP)

    // post a comment function


    delete Topic cache for non-logged in users

    delete Front page cache for non-logged in users

    The benefit being, now for any non-logged in user – the Front page and individual Topic pages will be cached once some submits a new comment.

    And if you are logged in, non of this effects you.

    Thoughts?

Viewing 8 replies - 1 through 8 (of 8 total)

  • John James Jacoby
    Keymaster

    @johnjamesjacoby

    This is how phpBB already works. ;)

    I think its a good idea though.

    I’d say, make it a plugin and I’d download it.

    Most forums get more page loads than posts so it really is a useful function. Either you make it a db cache or go for the full blown static html cache… I guess a db cache would suffice.


    _ck_
    Participant

    @_ck_

    This is already how wp-super-cache works. Just port it to bbPress.

    Does anyone mind pointing me to a document highlighting how to convert a WP plugin (wp-super-cache in this case) to bbPress?

    For some reason, I was under the impression that any WP plug-ins would work in bbPress; however, when I tried wp-super-cache with bbPress Alpha 6 … and once I enable it, it appears to not be working. No error. Forum still works. Just looks like nothing is happening and no caching occurring.

    Thanks in advance.


    chrishajer
    Participant

    @chrishajer

    WordPress plugins do not work inside bbPress. The advice is normally to port it from WordPress to bbPress but I don’t believe I’ve seen any documentation on how to do that.

    The only WP plugin I ‘ported’ to BB was bad-behavior, which was as simple as taking that plugin’s blank template, slapping a bbpress plugin header to the top, and praying. Seems to work. You’d have to reverse engineer something as complex as wp-super-cache.


    _ck_
    Participant

    @_ck_

    wp-super-cache would not be as difficult as you’d imagine to port.

    However 0.9 is so fast, it doesn’t even need it in most cases.

    That will change with bbPress 1.0 which is twice the size of 0.9 and has many more files. It will need a cache for more active sites. I might try to make the effort in a few months to convert it.

    >> “However 0.9 is so fast, it doesn’t even need it in most cases. That will change with bbPress 1.0 which is twice the size of 0.9 and has many more files. It will need a cache for more active sites. “

    Hopefully someone will port wp-super-cache sooner than in a “few months”

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Skip to toolbar