Forum
Resource Clean-Up Clarification
Hi
I have set my PERCH_UNDO_BUFFER
to 1
and have removed an image from a collection item (a Case Study) and made a couple more edits to that Case Study, however, the image is still in the resources folder and still visible in assets.
Am I misunderstanding how clean-up works?
Diagnostics:
Perch Runway: 3.0.8, PHP: 5.6.30, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $, with PDO
Server OS: Darwin, cgi-fcgi
Installed apps: content (3.0.8), assets (3.0.8), categories (3.0.8), perch_blog (5.5.1), perch_forms (1.9)
App runtimes: <?php $apps_list = array( 'perch_blog', 'perch_forms' );
PERCH_LOGINPATH: /admin
PERCH_PATH: /Users/Toby/Sites/frukt/admin
PERCH_CORE: /Users/Toby/Sites/frukt/admin/core
PERCH_RESFILEPATH: /Users/Toby/Sites/frukt/admin/resources
Image manipulation: GD
PHP limits: Max upload 32M, Max POST 32M, Memory: 128M, Total max file upload: 32M
F1: 0c66c2e1f82f9e0b7617b2cb8270f2c7
Resource folder writeable: Yes
SCRIPT_NAME: /admin/core/settings/diagnostics/index.php
REQUEST_URI: /admin/core/settings/diagnostics/
DOCUMENT_ROOT: /Users/Toby/Sites/frukt
HTTP_HOST: loc.frukt:8888
Toby, I think the cleanup is an automatic process, so the fact that the buffer has been reduced won't effect immediately, I think when the cleanup happens it will remove , leaving undo at 1 level.
This is my understanding of undo buffer and cleanup, but heck I've been wrong before :)
That's cool if that's the case, but knowing when the cleanup happens would be good to know.
It happens when the content is edited.
Thanks Drew. I've edited the content for that collection item a few times now but the cleanup hasn't happened.
Full Diagnostics:
Are the assets marked as library items?
No, and they're not used anywhere else either.
Have they been added less than 24 hours ago?
No, according to the database:
resourceCreated: 2017-05-19 13:34:50
But the Updated date is today:
resourceUpdated: 2017-07-10 10:28:09
Could that be the reason?
No, we only look at the creation date. That's to guard against the cleanup routines deleting something you've only just added but haven't had a chance to use yet.
Okay, in that case, any ideas why the cleanup isn't happening?
The only thing I can think is that some point of data is inconsistent and so the routine is leaving the file in place as it can't be 100% sure it's not in use.