google-code-export / candydolldb

Automatically exported from code.google.com/p/candydolldb
0 stars 0 forks source link

Cacheclear Buttons on View pages not working #30

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Go to any of a model's model_view, set_view or image_view page
2. Click the Clear cacheimage button
3. Everything appears to work since no error is thrown, but no cache images are 
cleared

What is the expected output? What do you see instead?
Expected output is all cache images referenced with 
CacheImage::GetCacheImages($cisp) to be cleared, yet upon viewing the script 
output, it passes TRUE at $cisp->getValues(), yet returns an empty array at 
CacheImage::GetCacheImages($cisp), so the next part to delete passes FALSE and 
is not processed and the page redirects automatically.

Original issue reported on code.google.com by mranimos...@gmail.com on 12 Aug 2012 at 12:44

GoogleCodeExporter commented 9 years ago
Found it, not yet fixed it.

For deleting a cache-image, one is supposed to supply the Width and Height of 
the image to search-and-destroy. On the clear-cache-image buttons, this info is 
not (and should not) be available.

I'll look into altering the GetCacheImages() function.

Original comment by fwp...@gmail.com on 13 Aug 2012 at 10:36

GoogleCodeExporter commented 9 years ago
Should be fixed in r685.

Original comment by fwp...@gmail.com on 13 Aug 2012 at 10:54

GoogleCodeExporter commented 9 years ago
seems to be working. But I was under the assumption that clicking the Clear 
Cacheimage button in set_view.php would also delete the cache images generated 
from the set thumbnail view.

Maybe we should add that feature?

Original comment by mranimos...@gmail.com on 13 Aug 2012 at 10:46

GoogleCodeExporter commented 9 years ago
The feature already exists.

A click on 'Clear cacheimage' clears all cached images belonging solely to that 
model/set/image/video.

I have tested and verified this behavior by having a very small amount of pics 
on-disk, and keeping a constant eye on the CacheImage table. By visiting 
index.php, a M-{UUID}.jpg is generated. On model_view another M-{UUID}.jpg is 
generated. If I now click the button, both images are DELETEd from the DB.

The last action of cacheimage_delete.php is to send the user back the way 
he/she came - thus reloading model_view.php and regenerating that cacheimage. 
Upon returning to index.php, this cached image is regenerated too. The 
admin_panel.php now shows 2 orphan files.

This goes for set.php and set_view.php, too.

Original comment by fwp...@gmail.com on 14 Aug 2012 at 10:30

GoogleCodeExporter commented 9 years ago
What I mean is when you click on a set and you have Thumbnail view enabled, the 
cache images created are created under $ImageID in the cache table. Would be a 
nice feature maybe in the Set View page to delete all cached $ImageID's for the 
set thumbnail view.

Tried to modify the cache_delete function to get the $InageID's of all cache 
images for the $SetID that is referenced, But am having trouble sending the 
ImageID array to the search parameters via the $MultipleImageIDs part. 
Understanding the search parameters seem to elude me for now

Original comment by mranimos...@gmail.com on 15 Aug 2012 at 9:16

GoogleCodeExporter commented 9 years ago
Should be added in r687.

Original comment by fwp...@gmail.com on 15 Aug 2012 at 10:30

GoogleCodeExporter commented 9 years ago
Works great :)

Original comment by mranimos...@gmail.com on 16 Aug 2012 at 4:41