Daniel.de Posted November 17, 2019 at 02:48 PM Share Posted November 17, 2019 at 02:48 PM Hi Everybody, I am planning to use Joomlas Page Cache Plugin or Speedcache. After someone creates or update a listing, we have to wait until the cache is cleared. For Admins, it's easy to clear the cache in the backend, but for public or registreds users it's not. So I am trying to delete the cache after a listing was updated or changed. First I tried Regular Labs "Cache Cleaner". Cache Cleaner can also clear Joomla! cache automatically when you save (or apply) an article or other item. You can also enter a comma separated list of other tasks to consider as a save. Tasks can include things like publish, unpublish, delete, etc.... But this won't work with JReviews. I tried "save,_save,publish,.... After that I tried to use Developer Events like "listing_was_updated" to trigger the Frontend Secret URL from CacheCleaner like that: <?php /** * @package JReviews * @author ClickFWD LLC (https://www.jreviews.com) * @copyright Copyright (C) 2010-2018 ClickFWD LLC * @license GNU GPL version 3 or later */ namespace JReviews\Events; defined('MVC_FRAMEWORK') or die; use S2App; use Clickfwd\Event\BaseEvent; use JReviews\Events\Traits\Helpers; use JReviews\Events\Traits\Listing; S2App::import('EventTrait',['helpers','listing'],'jreviews'); class ListingWasUpdated extends BaseEvent { use Helpers; use Listing; // create a new cURL resource $ch = curl_init(); // set URL and other appropriate options curl_setopt($ch, CURLOPT_URL, "https://secreturl...."; curl_setopt($ch, CURLOPT_HEADER, false); // grab URL and pass it to the browser curl_exec($ch); // close cURL resource, and free up system resources curl_close($ch); } Do you have any idea to clean the cache after listings are created or updated? Best regards Daniel Link to comment
Alejandro Posted November 17, 2019 at 03:38 PM Share Posted November 17, 2019 at 03:38 PM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
Daniel.de Posted November 17, 2019 at 07:26 PM Author Share Posted November 17, 2019 at 07:26 PM (edited) This section is only visible with a valid subscription. If you have a valid subscription, please login. Edited November 17, 2019 at 07:27 PM by Daniel.de Link to comment
Alejandro Posted November 17, 2019 at 08:18 PM Share Posted November 17, 2019 at 08:18 PM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
Daniel.de Posted November 17, 2019 at 10:17 PM Author Share Posted November 17, 2019 at 10:17 PM This section is only visible with a valid subscription. If you have a valid subscription, please login. Alex.1 1 Link to comment
Alejandro Posted November 18, 2019 at 01:02 AM Share Posted November 18, 2019 at 01:02 AM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
Daniel.de Posted December 21, 2022 at 03:21 PM Author Share Posted December 21, 2022 at 03:21 PM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
Alejandro Posted December 21, 2022 at 04:03 PM Share Posted December 21, 2022 at 04:03 PM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
Daniel.de Posted December 21, 2022 at 11:14 PM Author Share Posted December 21, 2022 at 11:14 PM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
Alejandro Posted December 21, 2022 at 11:16 PM Share Posted December 21, 2022 at 11:16 PM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
Daniel.de Posted December 21, 2022 at 11:23 PM Author Share Posted December 21, 2022 at 11:23 PM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
Recommended Posts