FORUMS CLOSED DUE TO SPAM. YOU STILL CAN ADD POST!

Funky Cache (beta testers wanted)

Feed 96 posts, 14 voices

Avatar
184 posts

Tuupola, I agree about the safe mode. Our server doesn’t use safe mode, so I wouldn’t conclude that this is the cause of the problem. I can provide you with access to our server info if you think that would help.

 
Avatar
184 posts

Hi Tuupola,

I have made changes to Funky Cache to now get it to create multiple directory levels on the Windows platform, and it works great so far (still flashes a blank page when first viewed though, which may be something to do with me using a functions snippet at the top of each layout, because the html source will always show anything above it – still, this is a small gripe for local windows testing at present).

I have to test it some more, but if it works as well as it does with more testing, I think we can look to having this work more reliably on the Linux platform too.

Update: initial Linux testing seems to be working. Will confirm later.

 
Avatar
184 posts

I do have a question Tuupola,

Is there a reason that when a page is changed, that all other pages need to be re-cached? I would have thought it would be possible to replace just that file, if it exists. This would mean that the editor would just need to ensure that they view pages as they edit them, to ensure it is pre-cached.

Update: I just notcied that it does that when you actually edit ‘anything’ in the backend. I think I follow your logic for doing that … what if changing a snippet or layout affected numerous pages in one go etc etc … hmmm, interesting dilema.

 
Avatar
291 posts

Is there a reason that when a page is changed, that all other pages need to be re-cached? I would have thought it would be possible to replace just that file, if it exists.

Because when you edit a page it might affect more than just the page you edited (navigation, archive pages etc etc).

This would mean that the editor would just need to ensure that they view pages as hey edit them, to ensure it is pre-cached.

Why would you want to precache? It will be automatically cached next time someone access the page.

 
Avatar
184 posts

Why would you want to precache? It will be automatically cached next time someone access the page.

If a page was large or simply had alot of otherwise-dynamic content (we’re talking Frog snippets, functions etc) to draw in, I was thinking that is where using a cache solution would be most appropriate. Indeed in many (if not most) cases the first visitor would have to experience below-optimum performance, so the author of the content should have the honours I feel.

I am just nitpicking though, Tuupola … I totally understand the potential dilemas as to why you have opted to do it the way you have.

On a sidenote, the Windows and Linux tests have proved flawless for me (Windows first white-flash aside). If you’re interested in testing the changes at your end, I’d be happy to fix you up.

 
Avatar
291 posts

Indeed in many (if not most) cases the first visitor would have to experience below-optimum performance, so the author of the content should have the honours I feel.

Yes of course the first request is slower than Funky Cached request. Cached request is static file. There is nothing faster than serving a static file. Of course the request which goes to Frog is slower. For example on one of my sites which contains many snippets and dynamically generated navigation cached request is takes around 0.3 seconds. After clearing the cache the first request takes around 0.7 seconds. All the following requests are 0.3 seconds again.

Having 0.4 second difference in one request is not a problem for me.

 
Avatar
6 posts

Love this plugin. :) However, there seems to be an issue with the downloaded ZIP (v0.3.5) from the project page: the views folder and its contents seem to be missing. Same with the ZIP and TAR on GitHub. I had to manually recreate the missing files from the code posted on GitHub in order to get Funky Cache working.

 
Avatar
291 posts

Where did you download the ZIP from? I downloaded the latest from my website and it has views folder. I ask because I do not provide downloads as ZIP files. Instead they are GZ files.

 
Avatar
6 posts

Sorry, I meant the file from your website. Just to be sure, I re-downloaded the file from the link you just posted, but I still don’t get any views folder in it. Here’s a screenshot of the file contents:

 
Avatar
291 posts

I rechecked and I am 100% sure the views folder is in the tarball. Try opening the file with something else than WinRAR.

 
Avatar
6 posts

Hmm… you’re right. I opened the file with 7zip and sure enough, the views folder was there. Checked the same file with WinRAR and the folder was gone. Weird.

 
Avatar
26 posts

I’ve installed the funky cache plugin correctly, but when I enable the plugin, the tab doens’t show in the admin.
I can confirm that the database was updated with the settings funcky cache makes.
I can confirm that a folder named cache is present on my root and is cmod to 777.
I can also confirm that i’ve set USE_MOD_REWRITE to true.

I’ve have no issues with other plugins, just with funcky cache.

What is going on?

 
Avatar
6 posts

Likely you’ve run into the same problem I did with some files being missing after extracting plugin. I suggest you re-download (just to be on the safe side) then open the downloaded TAR.GZ with 7-Zip and extract the file contents. Don’t use WinRAR or other archivers — that’s what caused the problem for me. If you don’t want to install a new program, then a portable version of 7-Zip is available. Re-upload the plugin files to your server.

 
Avatar
26 posts

7-Zip is all I use so thats not the problem.
I did download the file again (just to be sure) but all files are present;
unless something is missing in the orginal file as found at
http://www.appelsiini.net/download/frog_funky_cache.tar.gz

Any more idea’s?

 
Avatar
6 posts

Are all files present? The file and folder structure should be something like:

\funky_cache\disable.php
\funky_cache\enable.php
\funky_cache\FunkyCacheController.php
\funky_cache\index.php
\funky_cache\README.textile

\funky_cache\images
\funky_cache\images\cancel.png
\funky_cache\images\delete.png
\funky_cache\images\help.png
\funky_cache\images\page_copy.png
\funky_cache\images\pencil.png

\funky_cache\lib
\funky_cache\lib\DateDifference.php

\funky_cache\models
\funky_cache\models\FunkyCachePage.php
\funky_cache\models\Record.php

\funky_cache\views
\funky_cache\views\documentation.php
\funky_cache\views\index.php
\funky_cache\views\settings.php
\funky_cache\views\sidebar.php

If they’re all in the file you download, then check to make sure they’ve been uploaded properly (file uploads sometimes go awry).

Oh, I forgot to ask whether you’re using the latest stable version (0.9.5) of Frog CMS or the r367 dev version. I know Funky Cache works with the 0.9.5, but I don’t know about the dev.

 
Avatar
291 posts

Any more idea’s?

Enable debugging in Frog so you can see if PHP generates any error messages.

 
Avatar
26 posts

Well i’ve come a bit closer to the answer.
I reinstalled the Frog CMS on XAMPP for Windows.
When I install funcky cache the correct way it works fine.

But now for my situation:
i have a different name for my admin folder:
// The directory name of your Frog CMS administration (you will need to change it manually)
define(‘ADMIN_DIR’, ‘beheer’);

funcky cache generated this .htacces:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l
    # Administration URL rewriting.
    RewriteRule ^beheer(.*)$ beheer/index.php?$1 [L,QSA]
    # Rewrite index to check for static.
    RewriteCond  %{DOCUMENT_ROOT}/cache/index.html -f
    RewriteRule ^$ /cache/index.html [L,QSA]
    # Rewrite to check for cached page from cached folder.
    RewriteCond %{REQUEST_METHOD} ^GET$
    RewriteCond %{DOCUMENT_ROOT}/cache/%{REQUEST_URI} -f
    RewriteRule ^(.*)$ /cache/$1 [L,QSA]    
    RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_URI} !-f
    RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_URI} !-d
    RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_URI} !-l
    # Main URL rewriting.
    RewriteRule ^(.*)$ index.php?PAGE=$1 [L,QSA]
</IfModule>

When I use that .htaccess file there’s no tab in the admin.
I really would like to use a different foldername.
So where to go from here?

 
Avatar
291 posts

Oops. I have word admin hardcoded in file funky_cache/index.php. Will fix. But if you are in a hurry just change the line 31 from:

if ('/admin/index.php' == $_SERVER['PHP_SELF']) {

to

if ('/beheer/index.php' == $_SERVER['PHP_SELF']) {
 
Avatar
26 posts

Oops. I have word admin hardcoded in file funky_cache/index.php. Will fix.

I used your fix and it works fine now.
May I suggest to you to use both ALT and TITLE attributes on your images?
It helps gaining better accessibility for some users.

Also the generated .htaccess needs to be looked at,
it doesn’t take the value of, define(‘ADMIN_DIR’, ‘foo’);

I’ve allready edited funky cache to my needs:
dutch translation
alt and title attributes where needed

 
Avatar
291 posts

I have not coded I18N support for for Jeditable yet. That is on TODO list. I would be interested in adding the Dutch translation to it.