Member
Member
wibbi   2018-03-15, 16:15
#1

When using the plugin cacheManager, clicking on the button "Clear album image cache" in an album will only "_40_cw40_ch40_thumb.jpg", "_200_thumb.jpg" (thumbnails) and "_600.jpg" (resize) images from the cache deleted, but not the "_80_cw80_ch80_thumb.jpg" images.

Administrator
Administrator
acrylian   2018-03-15, 16:26
#2

That actually clears the whole album cache and makes no difference between sizes. Any errors? If you or anyone else visited the album before you looked at the cache again the image could have been just recreated.

Member
Member
wibbi   2018-03-15, 16:59
#3

I'm the only one and I'm not leaving the site after clicking on the button "Clear album image cache".

The debug.log:

99 Warnings after clicking on the button "Clear album image cache".
33 images in the album.

[code] WARNING: Cannot modify header information - headers already sent by (output started at /var/www/virtual/user/html/zp-core/admin-functions.php:4172) in /var/www/virtual/user/html/zp-core/i.php on line 194
header called from include (i.php [194])
from getImageURI (functions-basic.php [968])
from Image->getCustomImage (class-image.php [1000])
from getAdminThumb (admin-functions.php [4631])
from printAlbumEditForm (admin-functions.php [1679])
from admin-edit.php [693]
{20701:Thu, 15 Mar 2018 15:55:25 GMT}
WARNING: Cannot modify header information - headers already sent by (output started at /var/www/virtual/user/html/zp-core/admin-functions.php:4172) in /var/www/virtual/user/html/zp-core/i.php on line 195
header called from include (i.php [195])
from getImageURI (functions-basic.php [968])
from Image->getCustomImage (class-image.php [1000])
from getAdminThumb (admin-functions.php [4631])
from printAlbumEditForm (admin-functions.php [1679])
from admin-edit.php [693]
{20701:Thu, 15 Mar 2018 15:55:25 GMT}
WARNING: Cannot modify header information - headers already sent by (output started at /var/www/virtual/user/html/zp-core/admin-functions.php:4172) in /var/www/virtual/user/html/zp-core/i.php on line 196
header called from include (i.php [196])
from getImageURI (functions-basic.php [968])
from Image->getCustomImage (class-image.php [1000])
from getAdminThumb (admin-functions.php [4631])
from printAlbumEditForm (admin-functions.php [1679])
from admin-edit.php [693][/code]

Administrator
Administrator
acrylian   2018-03-15, 17:01
#4

Perhaps related to your custom changes. Please try the original code to sort that out.

Member
Member
wibbi   2018-03-15, 18:53
#5

I have now replaced all files with core hacks with untouched originals and still they are not deleted the "_80_cw80_ch80_thumb.jpg", all others already. I even deleted all images manually, then they were recreated. But the "_80_cw80_ch80_thumb.jpg" were not deleted again.

Member
Member
vincent3569   2018-03-15, 19:09
#6

I think (but not sure) that these cache images are recreated when admin page is reloaded.

to be sure: when you are on page album, and before delete cache images for this album, manually delete some "_80_cw80_ch80_thumb.jpg" and other "_80_cw80_ch80_thumb.jpg" with "_80_cw80_ch80_thumb.old.jpg" (it avoid to rename all :-) )
then delete your cache
if I am right, ALL your album cache is deleted (included "_80_cw80_ch80_thumb.old.jpg" and then some (or all) "_80_cw80_ch80_thumb.jpg" are recreated because adin edit need for them

Administrator
Administrator
acrylian   2018-03-15, 19:24
#7

What Vincent says ;-)

Member
Member
wibbi   2018-03-15, 19:29
#8

Muahaha, yes! Thats right. Thanks vincent!

Question: I don't understand why is $cachefolder = NULL?

[code] static function clearCache($cachefolder = NULL) {
if (is_null($cachefolder)) {
$cachefolder = SERVERCACHE;
}
zpFunctions::removeDir($cachefolder, true);
}[/code]

Administrator
Administrator
acrylian   2018-03-15, 19:38
#9

Its a general function for all caches. We have several, so it is for the actual folder to clear. There are two cache types as noted on the user guide

  • /cache the image cache
  • / cache_html/ for statically cached HTML pages using the static_html_cache plugin. This has sub folders for album, image, Zenpage pages, Zenpage news, rss feeds and sitemaps by some plugins (plugins can naturally use it to add further ones).
Member
Member
wibbi   2018-03-15, 19:45
#10

The function as function, yes. I mean the $cachefolder = NULL?
Why is set the variable $cachefolder to NULL as the start of the function? I don't understand this. Then $cachefolder is everywhere NULL?

[code]
function foo($foo = NULL) {
var_dump($foo ); // NULL
}
[/code]

Administrator
Administrator
acrylian   2018-03-15, 21:06
#11

if (is_null($cachefolder)) { $cachefolder = SERVERCACHE; }
= image cache clearance

Member
Member
wibbi   2018-03-15, 21:24
#12

if (is_null is something free of sense.

Administrator
Administrator
acrylian   2018-03-15, 22:03
#13

If not set specifially use the main default cache makes a lot sense to me…

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.