Re: Funky Cache

Fortron wrote:
mvdkleijn wrote:

Do you get any errors in the web server's error log?
Is Wolf running in the root of the site or in a subdirectory?

Errorlog contains no errors.
Wolf is running in root.

Tried it on a different website (different host too) and again no errors in the errorlog.
Some observations:

1. When Funky is enabled it prints Cache miss... even though it saves different pages to the cache directory, the content is allways that of the index though.
2. The htaccess rules prevent external files from being loaded (CSS, javascript, images)
or perhaps its due to Funky?
3. When the htaccess rules are removed and Funky is still enabled
it will only return the content of index, despite visiting different pages.

In circumstances like this, if I need to resolve issues with a plugin feature I like to test the plugin with a bare installation of Wolf. This helps me assertain if it is a problem with the plugin and my installation (in which case it is easier for the plugin developer to re-create at their end and diagnose).

Last edited by BlueWolf (2012-01-22 12:20)

Thumbs up

Re: Funky Cache

Sorry guys, you're totally right it isn't working properly.. Must have been dreaming :S Will fix though.

Edit: *groan*... for some reason my local Apache instance seems to be caching my .htaccess file!?! Never saw this one before :S Anyway, that seems to be the reason why I thought it was working when it wasn't.

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution.

Re: Funky Cache

Okay, there were two things going on...

1. The first half of the rewrite rules that handle index.html isn't correct. Comment those out for now. That will mean caching won't work for the homepage, but the rest will work.

2. Some old debugging code I left in from earlier funky_cache versions was messing things up when you run with debug turned on. I.e. the code that generated "cache miss...".

Just get the new index.php file for the plugin here: https://github.com/mvdkleijn/funky_cach … /index.php

That *should* give you a working cache. Don't forget to clear the cache before testing! You can see it is using a cached page because you can manually change the cached file on disk without changing the page in the DB and it will show the change.

Edit: I just tested this locally using a sub-dir install and remotely using a root install of a default Wolf CMS 0.7.5 instance. It works fine for me. Now I just need to figure out the proper rewrite rules to handle the homepage.

Last edited by mvdkleijn (2012-01-22 13:46)

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution.

Re: Funky Cache

I fixed (and tested on two systems) the rewrite rules for the homepage. It was just a matter of removing one line.

Get the updated file here: https://github.com/mvdkleijn/funky_cach … tation.php

Or just do a git pull from https://github.com/mvdkleijn/funky_cache

Please try it out and let me know. Everything should work cleanly now.

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution.

55

Re: Funky Cache

FunkyCacheController.php line 58 > FunkyCachePage::findByIdFrom
but in model FunkyCachePage.php can't find method findByIdFrom sad

"Everyone knows something cannot be done. Then along comes a man who does not know that it cannot be done and does it."
Albert Einstein

Re: Funky Cache

djgprv wrote:

FunkyCacheController.php line 58 > FunkyCachePage::findByIdFrom
but in model FunkyCachePage.php can't find method findByIdFrom sad

This can't be an error you're getting... findByIdFrom() is a method that is inherited from Record. I'm not getting any errors about this on my tests.

Also, if that wasn't working then the delete feature wouldn't be working... and it is working fine.

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution.

Re: Funky Cache

Works fine for me now Martijn.
Thanks for the quick fix.

Re: Funky Cache

Fortron wrote:

Works fine for me now Martijn.
Thanks for the quick fix.

Cool. Thanks for verifying. I'll make the version number final, create a zip and update the plugin repo.

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution.

59

Re: Funky Cache

mvdkleijn wrote:

Please try it out and let me know. Everything should work cleanly now.

Looking good! At my first re-install, it seemed only to serve an "un-dressed" (no CSS) homepage. I flushed local cache, manually emptied Funky's /cache/, un-installed, uploaded fresh zip, re-installed -- and all going well now! cool

I did notice in this process that the "Clear all" button in the admin only deletes *files*, not *directories*. Is that correct? would residual (even empty) directories confuse (?) Funky?

Anyway - great to see this working. Wolf serves out content like lightning already. This makes it greased lightning. big_smile

Re: Funky Cache

David wrote:

I did notice in this process that the "Clear all" button in the admin only deletes *files*, not *directories*. Is that correct? would residual (even empty) directories confuse (?) Funky?

That's correct David. Currently the plugin clears the disk cache based on the information stored in the DB. That means it only deletes the files because it doesn't check if a directory is empty. I'll change that in the future.

Empty directories are not picked up by the htaccess rewrite rules because the "-s" test is used. That tests if a) its a file and b) its size > 0 before it uses the cached file.

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution.

61

Re: Funky Cache

hi, how to use Funky Cache and Pager helper? I use 7.5 and mod_rewrite. Thanks for quick reply.

"Everyone knows something cannot be done. Then along comes a man who does not know that it cannot be done and does it."
Albert Einstein

Re: Funky Cache

You mean together? I don't think that's supported at the moment.

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution.