Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: asy_jpcache 0.9.8 - Fast Full Page Caching
This fix is working for me as well. I have been having problems with one site in particular and just happened on this thread. Same problems. I was initially getting errors in ie/opera as well. Then those disappeared and the blank page ff issue showed up.
I posted all the errors ‘here”:http://forum.textpattern.com/viewtopic.php?id=12757
This was the error in ie and opera only: Notice: Undefined index: HTTP_REFERER in /users/home/xxxxxx/web/public/textpattern/lib/txplib_misc.php(455) : eval()’d code on line 271
I though maybe it was the hitlogger plug, but I made the “fix” suggeested and re-activated hitlogger and all seems well for the time being.
One thing I have noticed on this site is that I am getting this Etag where on other sites I am using this the Etag is not listed when examining the headers. I don’t know anything about Etags. Would this indicate anything out of the ordinary?
ETag: “jpd—1730008019.6157”
Thanks!
Jamie
Offline
Re: asy_jpcache 0.9.8 - Fast Full Page Caching
Just a note: people not running on (F)CGI will worsen the situation by changing the code as described above.
Your error is not related to my plugin, soulship. There is exactly one occurence of $_SERVER['HTTP_REFERER'] in my code, and that is preceded by a check with isset(), precisely so it won’t throw errors like that.
ETag: "jpd-1730008019.6157" is used by the plugin to do caching stuff, like 304s. The jp is short for jpcache, which this plugin is based on.
Offline
Re: asy_jpcache 0.9.8 - Fast Full Page Caching
Still getting the same blank page (FF 1.5). Even after making the suggested change (using 4.0.3).
Eric
Offline
#49 2006-02-07 04:52:55
- neptho
- Member

- From: A cold, dark place.
- Registered: 2006-02-01
- Posts: 51
Re: asy_jpcache 0.9.8 - Fast Full Page Caching
Wow, I’ve been beaten by a long shot. I was just checking to see if anyone else was working on adding jpcache or a similar caching system to Textpattern – as I ended up modling jpcache for myself, I figured it’d be semi-trivial to add to Textpattern as well.. I forgot how static my system was.
I’ve taken a look at this and updated the admin side plugin, but I still can’t seem to get it to work, at all. Even with a few modifications to 0.9.8, I get the ‘X-Cache: asy_jpcache -’ header, and then it dies, not reporting a version number, or anything, observe:
HEAD / HTTP/1.1
Host: mysite.dur
HTTP/1.1 200 OK
Date: Tue, 07 Feb 2006 04:42:03 GMT
Server: Apache
X-Cache: asy_jpcache -
Content-Type: text/html; charset=utf-8
Sencer: I added this to the very head of your cache plugin to ensure that it had both the globals, and the cache (from within index.php):
// Trivial modification by ssh to keep from hacking the root index.php
if ( txpinterface == ‘public’ && !in_array ($_SERVER[“REQUEST_URI”], array(‘/&’)) ) {
include_once( $_SERVER["DOCUMENT_ROOT"]."/textpattern/config.php" );
include_once( $_SERVER[“DOCUMENT_ROOT”].”/jpcache/jpcache.php” );
}
// I stole plenty of code from zem. Don’t tell him! ;)
…
I’ll take another look into it, but I’m guessing that it’s still having problems loading it’s locals. Since I’m forcing it to have the globals available, I assume $path_to_site and other variables are exposed? (Yeah, it’ll take two seconds to find out, I know, I know..)
Offline
Re: asy_jpcache 0.9.8 - Fast Full Page Caching
Hi,
this nice plug-in is generating very big files in the cache.
I have found 3 o 4 files about 6MB.
I would say that it’s caching the files to download (mp3 in this case), but I cant confirm that those large files are related to the mp3 files.
I have tried to download one of this big cached files and rename it with .mp3 extension, but it doesnt play in my media player.
So, I cant conclude that those cached files are the .mp3, but I would like to avoid them, because I dont have enough space at my hosting.
Sencer, do you think it’s possible?
BTW: i’m using bas_emff plug-in to stream mp3s (and also have links to files with the TXP capabilities), could that be related to this problem?
thanks in advance.
Offline
Re: asy_jpcache 0.9.8 - Fast Full Page Caching
Yes, I can confirm that every time I push play in the bas_emff (a plug-in for mp3 streaming with flash) a 6MB file (corresponding with the size of the mp3 file) is generated in the cache.
is it possible to avoid that?
thanks.
Offline
Re: asy_jpcache 0.9.8 - Fast Full Page Caching
maniqui wrote:
this nice plug-in is generating very big files in the cache. I have tried to download one of this big cached files and rename it with .mp3 extension, but it doesnt play in my media player.
Yes, it’s probably the m3-files plus some additional meta-data, which is why you cannot simply rename it to have your original file back.
Sencer, do you think it’s possible?
Yes, file_downloads are are not cached for the same reason. You’ll have to search the jpcache files and check where it prevents the file-download, and then extend the code to the same for the plugin you are using – it must be recognizable via the url (usually via an event-variable).
Offline
Re: asy_jpcache 0.9.8 - Fast Full Page Caching
Actually, the plugin already uses regular file-downloads for streaming… menaing it should not have been problem
I guess you are using non-english language, correct?
bas_emff uses hu.gTxt('file_download').'/'.$thisfile['id']; to link to downloads. While this does work, those are not the urls generated by default. By default download always use “file_download” (not the localized string).
I think the easiest thing to do is, open the bas_emff plugin and replace the following line:
hu.gTxt('file_download').'/'.$thisfile['id'];
with
hu.'file_download'.'/'.$thisfile['id'];
Offline
Re: asy_jpcache 0.9.8 - Fast Full Page Caching
Hi Sencer,
thanks for your quick reply.
I have applied the line change in bas_emff, you suggested, but it didnt work: files are still being cached as big files with jpcache.
And you’re right, i’m using a non-english language (spanish).
The output code:
<code>
<object type=“application/x-shockwave-flash” data=“http://www.mysite.com/file_download/8?src=http://www.mysite.com/file_download/5” width=“110” height=“34”>
<param name=“movie” value=“http://www.mysite.com/file_download/8?src=http://www.mysite.com/file_download/5” />
</object>
</code>
Sencer wrote:
You’ll have to search the jpcache files and check where it prevents the file-download, and then extend the code to the same for the plugin you are using – it must be recognizable via the url (usually via an event-variable).
Sorry, dont know how to do that! I have looked at jpcache .php files and I found a chunk about file_donwload, but really dont know what I have to do.
I will point Bastian (the plug-in author) to this thread, maybe he can help too.
thanks, and any other advice would be appreciated.
Offline
Re: asy_jpcache 0.9.8 - Fast Full Page Caching
Oh!
I have found something:
Big files are also being cached when I click in the direct download link (i mean, the /file_download/file_id link).
So, this doesnt seem to be a problem only with bas_emff.
To generate the direct download link, I use upm_file_packets plug-in.
So, it’s affecting both bas_emff and upm_file_packets and in the second case, the generated link is a common TXP link to a file.
Offline
Re: asy_jpcache 0.9.8 - Fast Full Page Caching
Yes, I can confirm the problem. It’ll be a while before I can troubleshoot. My suggestion would be to deactive the plugin in the meantime (i.e. by removing or commenting out the line in index.php).
Last edited by Sencer (2006-04-09 17:54:23)
Offline
Re: asy_jpcache 0.9.8 - Fast Full Page Caching
I will deactive jpcache in the meanwhile.
If you release a new version, dont forget to add this fix
Thanks again, Sencer.
Offline
#58 2006-06-13 16:24:19
- Jordan
- New Member
- Registered: 2006-06-12
- Posts: 6
Re: asy_jpcache 0.9.8 - Fast Full Page Caching
Help me, please. Where I can look log-file debug this plugin? Sorry for my English.
Last edited by Jordan (2006-06-13 16:24:56)
Offline
Re: asy_jpcache 0.9.8 - Fast Full Page Caching
For debuging, you need to watch the HTTP Headers. I recommend Ethereal, or if you are on firefox, you can try the extenion: “tamper data”.
Offline
#60 2006-06-13 18:17:49
- Jordan
- New Member
- Registered: 2006-06-12
- Posts: 6
Re: asy_jpcache 0.9.8 - Fast Full Page Caching
Thank you very very much! I like your plugin, and try understand how it adjust configuration. I have a little problem with this, but I shall try again. Thank you once again!
Offline