• Hi,

    A bit of an odd one.

    If I create a new record in the back-end (wp-admin), the record is added to the database without issue. However, the new record is not displayed using the pdb_record template for a ‘period’ of time (2mins – 1 hour); it is immediately displayed in pdb_list and pdb_single templates. If the pdb_signup template creates the record through the frontend, everything works as it should.

    I’m guessing there’s nothing wrong with the code as it works eventually, and assuming it’s a WordPress Themes issue, but I (and those I have asked) haven’t seen this before.

    Any help would be gratefully received. TIA

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Roland Barker

    (@xnau)

    This is most likely due to some form of caching. This is most likely a plugin, these usually don’t cache for logged-in users.

    You need to clear the cache to see the fresh content, alternatively you can exempt the page from caching.

    Thread Starter helitraxuk

    (@helitraxuk)

    Hi Roland,

    Thanks for the very quick reply.

    I have already disabled caching via the wp-config.php file but the issue remains…

    Ian

    Plugin Author Roland Barker

    (@xnau)

    Keep looking, that is not the only way caching is controlled. Probably it’s a plugin.

    I have a comparable problem. When I update the Participants db by a script that runs outside of the Participantsdb plugin, in many cases I have to wait 24 hours before the results are visible via the plugin. I have seen that the plugin has its own cache that is by default set to a DAY (in the PDb_Participant_Cache class). In the Settings of the plugin there is no way to clear this cache or to set its expiration time. This would be a very helpful feature.
    Thomas

    Plugin Author Roland Barker

    (@xnau)

    So, for the original poster of this thread @helitraxuk, this cache is cleared automatically when a record is updated, either on the frontend or the backend, so this is not the problem you are seeing. If you have Participants Database debugging on, you will see the cache clearing message in the log.

    @thomaswesselplace: This is automatic when a record update happens using the Participants_Db::write_participant method, but you can invalidate the plugin’s internal cache for the specific record (meaning the record data must come from the database next time it is displayed) using this method call:

    PDb_Participant_Cache::is_now_stale( $record_id );

    • This reply was modified 4 years, 6 months ago by Roland Barker.
    • This reply was modified 4 years, 6 months ago by Roland Barker. Reason: spelling
    Thread Starter helitraxuk

    (@helitraxuk)

    Hi Roland,

    Is this the cache clearing message you are referring to? It’s the only caching message listed in the log;

    PDb_Participant_Cache::refresh_cache: Refreshing Participants Database cache for cache group 0

    Ian

    Plugin Author Roland Barker

    (@xnau)

    Yup, that’s it. The cache is kept in groups of 100, so that indicates the cache for the first group was cleared: record ids from 1 to 100.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘pdb_record data ‘delay’’ is closed to new replies.