• Resolved massimod

    (@massimod)


    Hello.

    A while back here, i was informed that Comet Cache works with this plugin. Tested today and it doesn’t work (doesn’t update at all when some new album or photo is added).

    I also check WP Super Cache with this plugins and seems to work just fine.

    Just FYI.

    Thanks

Viewing 15 replies - 16 through 30 (of 33 total)
  • Plugin Author Jacob N. Breetvelt

    (@opajaap)

    This is how it works:

    If it is the first time in the current session (within one hour of the first pageload or within one hour of a successive session) a fullsize (slideshow or lightbox) image is displayed, an ajax call is performed to the server to indicate that the viewcounter for this photo must be incremented.
    The server increments it in the photo data and invalidates the albums counters.
    This schedules a cronjob that runs after 10 seconds and re-calculates the album counters and clears the cache it knows about (wp-super-cache, W3 Total cache, Quick cache, Comet cache).

    This is one of a number of ways wppa finds it necessary to clear the cache (mostly by an ajax call). Others are:
    – Bump viewcount
    – Rating given
    – Delete photo
    – Undelete photo
    – Album delete
    – Update album
    – Update photo
    – Change setting
    – Comment given/edited
    – ALbum create during import
    – (re)Make resized image/thumbnail
    – Add album
    – Add photo

    At plugin setup and update, a force delete caches happens to – hopefully – clear all caches wppa does not know about: it deletes …/wp-content/cache

    Every optimization has a price and since visitors wants to see updates immediately happen (a deleted photo should immediately vanish from the lastten widget), you will always see only a few cached pages.
    Even a cached page without wppa in its url must be invalidated when it has a wppa widget on it, so excluding wppa will not be sufficient.

    To my opinion one should better spend a few bucks more for a fast server (cached php files, php version >= 7, db on ssd) and skip cachimg plugins entirely.

    Thread Starter massimod

    (@massimod)

    Thanks for the detailed explanation.

    Still what is the reason that your plugin to support those caching plugins, when only one page per album and one page with the wppa shortcode is cached ?

    Anyway, i highly disagree with STATIC caching not needed, but it is OT to write why etc etc here.

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    This is what i saw a few minutes ago as cached pages on https://wppa.nl/ :
    https://wppa.nl/wp-content/wppa-pl/Screenshots/Cached-pages-1.PNG
    https://wppa.nl/wp-content/wppa-pl/Screenshots/Cached-pages-2.PNG

    So, there are reasonable many cached pages when there are approx 70 user sessions active

    Thread Starter massimod

    (@massimod)

    Jacob,

    Your plugin clears the WHOLE CACHE OF THE SITE, that is what i try to tell you.

    Posts, pages, everything.

    I don’t think that is right. It should clear YOUR pages only.

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    No, it is unfortunately needed, because pages without [wppa… can still have wppa widgets.

    The confusion here is that wppa does not have pages. It has albums and photos and there is no direct relation between them and pages.

    Thread Starter massimod

    (@massimod)

    This is a bad decision. Because if i want to EXCLUDE Wppa from caching (the page that hosts the shortcode), WPPA still clears the WHOLE cache. Imagine that in a blog with 10.000 posts or other stuff.

    For me, i did comment out the comet cache clear call in wppa functions file. Not the best approach, but ….

    Still, the best media gallery out there !!!!

    • This reply was modified 6 years, 11 months ago by massimod.
    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    I have sent you this mail this morning:

    After a sleepless night i found a method to selectively delete cache files.

    I will work it out, and i will ask you – as soon as i have it working – to test the dev version.

    To be continued…

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Got it working.

    Please test it as follows:
    – Install the current dev version ‘6-8-06-003’, you know how.
    – Activate it, this will clear the entire cache for the last time.
    – Tick the boxes Table IX-A9.1: Log Cron and Table IX-A9.4: Log File Events.
    – Verify the correctness of Table IX-A13: Cache Root, change if its wrong.

    What will happen:
    – All pages – hence cache files – that contain wppa data will have at least one html tag that contains the attribute: ‘data-wppa=”yes”‘
    – Adding/editing/deleting albums, photos, comments or ratings will schedule wppa clear cache to happen at the background after 10 seconds.
    – Changing any counter (due to adding/removing photo or viewing an album or large image) will schedule wppa clear cache to happen at the background after 10 minutes.
    – If, in the mean time, an event of higher priority happens that requires cache cleaning earlier, the existing scheduled event (the 10 min event) will be replaced by a 10 seconds event.
    – Cleaning cache as initiated by wppa, will only remove caches files that contain ‘data-wppa=”yes”‘.

    How to monitor:
    Look at the wppa logfile (Table VIII-C1), you will see lines like:

    Cron: on:23.03.2018 15:46:10: opajaap: wppa_clear_cache re-scheduled
    Cron: on:23.03.2018 15:54:44: cron-job: wppa_clear_cache started.
    Fso: on:23.03.2018 15:54:44: cron-job: Cron removed cachefile: /cache/comet-cache/cache/https/wppa-nl/sv/docs-by-subject/development-version.html
    Cron: on:23.03.2018 15:54:44: cron-job: wppa_clear_cache completed.
    

    Thanx to poeple like you, who ask the right questions at the right time, this plugin is getting better everytime.

    Thread Starter massimod

    (@massimod)

    Thanks, i will do all that later in the night and update here.

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Do not forget to clean the exclusions in cometcache!

    Thread Starter massimod

    (@massimod)

    [23-Mar-2018 16:54:41 GMT] PHP Fatal error: Uncaught Error: Call to undefined function wp_unschedule_hook() in /home/wp-content/plugins/wp-photo-album-plus/wppa-cron.php:293

    ????

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Strange. I am not home, back on monday.

    Thread Starter massimod

    (@massimod)

    Jacob, maybe the wp_unschedule_hook was introduced in 4.9 and i’m running 4.8.x ?

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    That is correct. wp_unschedule_hook() is introduced at 4.9.0.
    I will test if just not removing but only adding the new scheduling will indeed trigger the cleanup earlier.

    Thread Starter massimod

    (@massimod)

    I would suggest for me to upgrade, still this would be bad for all people using your plugin and have older WP versions to 4.9.

    Also, does all this caching thing (i brought up) worth your time ?

    • This reply was modified 6 years, 11 months ago by massimod.
Viewing 15 replies - 16 through 30 (of 33 total)
  • The topic ‘Caching plugins and WP Photo Album plus’ is closed to new replies.