We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22303 MODX Staff
    • 10,725 Posts
    Quote from: kudykam at Jun 06, 2013, 03:50 AM
    Well it didnt work because a wrong path, it has to be:
    $ck = MODX_CORE_PATH . "cache/resource/" . $modx->resource->getCacheKey(); 
    Hardcoding the absolute path to an entry in a configurable cache engine is not a valid solution. All that you need to do this properly is available via the cacheManager API, as I described above.
      • 16430
      • 217 Posts
      well maybe...I don know how to fix it properly and it works for my purposes...
      Anyway when I clear the cache using xPDO for newly created resources, it probably doesnt delete some important cache to be able to create url via makeUrl, Now it always return empty value...
        • 16430
        • 217 Posts
        Quote from: kudykam at Jun 06, 2013, 06:57 AM
        ...when I clear the cache using xPDO for newly created resources, it probably doesnt delete some important cache to be able to create url via makeUrl, Now it always return empty value...

        This can be solved by:
        $modx->cacheManager->refresh(array( 
            'context_settings' => array('contexts' => array('web'))
        )); 

        Or disabling cache_alias_map in system settings