<![CDATA[ Revolution | Cache Browser-Manager/ Selective Cache Clearance - My Forums]]> https://forums.modx.com/thread/?thread=25157 <![CDATA[Re: Revolution | Cache Browser-Manager/ Selective Cache Clearance]]> https://forums.modx.com/thread/25157/revolution-cache-browser-manager-selective-cache-clearance?page=7#dis-post-531274 BobRay Sep 09, 2015, 05:21 PM https://forums.modx.com/thread/25157/revolution-cache-browser-manager-selective-cache-clearance?page=7#dis-post-531274 <![CDATA[Re: Revolution | Cache Browser-Manager/ Selective Cache Clearance]]> https://forums.modx.com/thread/25157/revolution-cache-browser-manager-selective-cache-clearance?page=7#dis-post-531113
maybe you remember that we were wondering why cachemaster doesn´t work for snippets. I think I found the problem. In the following part of the Code for deleting the cache-file of a single snippet the code deletes only the cached file in folder 'cache/scripts/elements/snippets/' and not in 'cache/includes/elements/snippets/' because it is missing in the part of the code as copied below.

BTW: In our installation it is only necessary to delete the cached file in the 'include-folder'. Therefore it might be enough to only replace in the given path 'scripts' by 'includes' and changing the file-name into '.include.cache.php' and changing 'snippets' into 'modsnippet'. At least this was successful in our settings.

Thanks a lot again for this really excellent add-on ...

case 'OnBeforeSnipFormSave':

        $docId = $snippet->get('id');

        /* set path to default cache file */
        $path = MODX_CORE_PATH . 'cache/scripts/elements/snippets/' . $docId . '.cache.php';

        $cKey = $snippet->getScriptCacheKey();
        if ($doDebug) {
            my_debug('Cache Key: ' . $cKey);
        }
        $modx->cacheManager->delete($cKey, array(
            xPDO::OPT_CACHE_KEY => $modx->getOption('cache_scripts_key', null, 'scripts'),
            xPDO::OPT_CACHE_HANDLER => $modx->getOption('cache_scripts_handler', null,
                $modx->getOption(xPDO::OPT_CACHE_HANDLER)),
            xPDO::OPT_CACHE_FORMAT => (integer)$modx->getOption('cache_scripts_format', null,
            $modx->getOption(xPDO::OPT_CACHE_FORMAT, null, xPDOCacheManager::CACHE_PHP))
        ));
        break;
]]>
lettis Sep 06, 2015, 09:51 AM https://forums.modx.com/thread/25157/revolution-cache-browser-manager-selective-cache-clearance?page=7#dis-post-531113
<![CDATA[Re: Revolution | Cache Browser-Manager/ Selective Cache Clearance]]> https://forums.modx.com/thread/25157/revolution-cache-browser-manager-selective-cache-clearance?page=7#dis-post-468858
I'll try to check it out when I have time.

]]>
BobRay Jun 11, 2013, 11:11 PM https://forums.modx.com/thread/25157/revolution-cache-browser-manager-selective-cache-clearance?page=7#dis-post-468858
<![CDATA[Re: Revolution | Cache Browser-Manager/ Selective Cache Clearance]]> https://forums.modx.com/thread/25157/revolution-cache-browser-manager-selective-cache-clearance?page=7#dis-post-468798
Is this maybe a bug or do you have an idea if there is any other setting in our installation which could be responsible for this behavior?

Both folders are set to chmod 750.]]>
lettis Jun 11, 2013, 01:50 PM https://forums.modx.com/thread/25157/revolution-cache-browser-manager-selective-cache-clearance?page=7#dis-post-468798
<![CDATA[Re: Revolution | Cache Browser-Manager/ Selective Cache Clearance]]> https://forums.modx.com/thread/25157/revolution-cache-browser-manager-selective-cache-clearance?page=7#dis-post-468582
Are you sure that the snippet files you're seeing in the cache contain the old code? They may be being updated there before you look at them.]]>
BobRay Jun 08, 2013, 07:53 AM https://forums.modx.com/thread/25157/revolution-cache-browser-manager-selective-cache-clearance?page=7#dis-post-468582
<![CDATA[Re: Revolution | Cache Browser-Manager/ Selective Cache Clearance]]> https://forums.modx.com/thread/25157/revolution-cache-browser-manager-selective-cache-clearance?page=7#dis-post-468462
But even updating to 1.1.1 it doesn´t work in our case. While selective cache clearing of a resource works really fine it doesn´t work with snippets.

I tried it by changing the doSnippets to 'Yes' in the default Property Set and also in a new customized Property Set but it doesn´t work but in no case the two cached files of a snipped are not deleted.

I also upgraded CHMOD of the two folders from 640 to 770 but this also leads to no deletion of the cached snippet-files in core/cache/scripts/elements/modsnippet/ and core/cache/includes/elements/

Do you have any idea what I also could try to find the problem?

]]>
lettis Jun 07, 2013, 10:22 AM https://forums.modx.com/thread/25157/revolution-cache-browser-manager-selective-cache-clearance?page=7#dis-post-468462
<![CDATA[Re: Revolution | Cache Browser-Manager/ Selective Cache Clearance]]> https://forums.modx.com/thread/25157/revolution-cache-browser-manager-selective-cache-clearance?page=7#dis-post-468392
Unless I'm misunderstanding you, CacheMaster 1.1.1 should handle that.

]]>
BobRay Jun 07, 2013, 03:09 AM https://forums.modx.com/thread/25157/revolution-cache-browser-manager-selective-cache-clearance?page=7#dis-post-468392
<![CDATA[Re: Revolution | Cache Browser-Manager/ Selective Cache Clearance]]> https://forums.modx.com/thread/25157/revolution-cache-browser-manager-selective-cache-clearance?page=7#dis-post-468292
as it doesn´t seem like the modx-team is going to implement something like $object->clearCache()

is it possible for you to add a code-line to your plugin or make a plugin like cachemaster for plugins that deletes the cached files of a snippet when a snippet is saved?

If the corresponding files in these folders are deleted on saving a snippet you would just have to uncheck 'clear cache on save' when working on a snippet and everything would be fine on saving a snippet:

core/cache/includes/elements/modsnippet/
core/cache/scripts/elements/modsnippet/

What do you think about this?

Letti]]>
lettis Jun 06, 2013, 02:03 PM https://forums.modx.com/thread/25157/revolution-cache-browser-manager-selective-cache-clearance?page=7#dis-post-468292
<![CDATA[Re: Revolution | Cache Browser-Manager/ Selective Cache Clearance]]> https://forums.modx.com/thread/25157/revolution-cache-browser-manager-selective-cache-clearance?page=7#dis-post-464489
]]>
BobRay Apr 26, 2013, 10:29 PM https://forums.modx.com/thread/25157/revolution-cache-browser-manager-selective-cache-clearance?page=7#dis-post-464489
<![CDATA[Re: Revolution | Cache Browser-Manager/ Selective Cache Clearance]]> https://forums.modx.com/thread/25157/revolution-cache-browser-manager-selective-cache-clearance?page=7#dis-post-464446 Quote from: BobRay at Mar 01, 2013, 11:57 PM
I've submitted a feature request. If it goes through,
Hi Bob,
do you have any information if the feature request was 'accepted' you added over a month ago?

What do you think who of the modx-core-team would be responsible for such a question / who we could ask about implementation of such a feature?

My impression is that the core team is not as active here in the forum anymore as it used to be ...

Thanks again for your work ...
Letti]]>
lettis Apr 26, 2013, 09:16 AM https://forums.modx.com/thread/25157/revolution-cache-browser-manager-selective-cache-clearance?page=7#dis-post-464446