APC caching plugin

  1. 4 years ago
    Edited 4 years ago by Tux

    Although esoTalk has little support for caching (nudging @tobscure here ;)), here's an actual (simple) cache implementation using a thin wrapper around APC as the backend.

    The plugin in its entirety is available at https://gist.github.com/minecrafter/46673a1e4fefff622f6c . All you have to do is create a plugins/APCCache directory and drop the plugin.php in. It should been be able to be enabled and should work automagically.

    Of course this is a plugin I made in a few minutes after reading the esoTalk source code, being bored, and wanting to improve the performance of our own esoTalk site , so I want some feedback and it obviously needs some work. But it is a good start.

  2. Updated the plugin to use the forum's cookie name as a unique caching key.

  3. I must say I like what you did with esoTalk's forum software, you even implanted it into your website, might I say rather nicely, wish I could have done this with mine! lol

  4. Edited 4 years ago by Tux

    @Felli I must say I like what you did with esoTalk's forum software, you even implanted it into your website, might I say rather nicely, wish I could have done this with mine! lol

    I don't actually like the way it is implemented. Our esoTalk codebase is quite literally a frankenstein mess of custom code and some bits from git on top of 1.0.0g4. A good example are images on our forums, which are using a custom preg_replace_callback hack in the BBcode plugin to rewrite image tags to a local camo instance.

  5. @Tux I don't actually like the way it is implemented. Our esoTalk codebase is quite literally a frankenstein mess of custom code and some bits from git on top of 1.0.0g4. A good example are images on our forums, which are using a custom preg_replace_callback hack in the BBcode plugin to rewrite image tags to a local camo instance.

    Nonetheless looks really good. Nothing I myself could do without a more experienced coder on staff. XD

  6. Toby

    5 Oct 2014 Administrator

    Fantastic work. It's a shame, I think the only place esoTalk actually makes use of the cache right now is in ETChannelModel and ETGroupModel. PRs welcome!

  7. Edited 4 years ago by Tech

    I have added 2 pictures so can someone explain to me what needs to be done here to get this installed?

    1.png
    2.png

    anyone can help with some guidance?

  8. Edited 4 years ago by Tech

    ok here is what I did
    addons/plugins/APCCache
    dropped just the plugin.php file

    This does not work unfortunately, I tried clicking several times to enable it inside the Admin/plugins and in the end I had to delete it completely due to it crashing the site.

  9. Edited 4 years ago by Tech

    Oh I did notice something
    this is APCCache NOT Zend opcache so probably that's why?

  10. [deleted]

    22 Mar 2015

    Probably should try APCu.

  11. @icecream Probably should try APCu.

    I don't have APC the ONLY extension close enough is opcache which works with Zend

  12. [deleted]

    22 Mar 2015

    If you use PHP 5.5 or greater OpCache is used for bytecode caching. APCu is a trimmed version of APC (old, deprecated bytecode cache), which only includes the user cache.

    If you use Debian/Ubuntu or derivatives enter:

    sudo apt-get -V install php5-apcu

    for installing it via apt, or

    sudo pecl install APCu

    via PECL (recommended).

    (Alternatively use Yac)

  13. Edited 4 years ago by Tech

    @icecream If you use PHP 5.5 or greater OpCache is used for bytecode caching. APCu is a trimmed version of APC (old, deprecated bytecode cache), which only includes the user cache.

    If you use Debian/Ubuntu or derivatives enter:

    sudo apt-get -V install php5-apcu

    for installing it via apt, or

    sudo pecl install APCu

    via PECL (recommended).

    (Alternatively use Yac)

    Great advice
    If this helps, i have windows server installed , so where would I be looking to find this addon for apcu
    here is what I have enabled so far
    mod_expires, mod_headers, mod_deflate, Zend opcache
    I don't see APCu in my
    "apache modules httpd.conf"
    "php settings/ extensions"
    let me konw
    thanks

  14. Edited 4 years ago by Tech

    The alternative way to get this to work for windows users........
    I had to search online for the PHP 5.5 cache extension APCu for php extensions
    http://pecl.php.net/package/APCu/4.0.7/windows
    Choosing the right Dll file I extracted the ACPu ...dll file inside the php ext folder
    I spent time to make sure that everything was configured and working
    I went here http://localhost/?phpinfo=1
    Voila it appears the apcu is running and enabled

    Now lets test this plugin

  15. Edited 4 years ago by Tech

    Ok here it is folks

    APCCache.png

    But I seem to have a problem where with this plugin, I just cant seem to disable it?

    How to know if this plugin is 100% working and please any help would be appreciated to know why it doesn't disable after unchecking the checkmark several dozen times?

  16. Why it doesn't it disable like other plugins should when you click on it?
    Can someone please update this plugin?

 

or Sign Up to reply!