• Hello,

    I have a WP back-end which is hosted with a DreamPress Plan by : dreamhost.com , with varnish cache plugin is installed and active.

    i have purchased and installed an offers and coupons theme (https://demo.powerthemes.club/fbar/?theme=CouponXxL).

    Now, i built a business around this WordPress theme ( coupons & offers mobile app ) and it was required to add two new tables to the database to cover some new business requirements/features.

    The problem is:

    when my mobile app reads data from the built-in WP tables (through API) then everything is ok, but when it reads data from the two custom tables (also through API) then i get cached data (not the actual data).

    Clear the cache fix the problem but it is not a solution since mobile users continuously submits data into these two tables and when they refresh the screen they get old date (not the updated date). I can’t do manual cache clearing all the day.

    Please, i appreciate if you could help in this.

    I hope to her good new as whole my business and my iOS and Android apps are tightly dependent/coupled on this issue.

    Thank you
    Bilal

Viewing 1 replies (of 1 total)
  • Plugin Contributor Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    but when it reads data from the two custom tables (also through API) then i get cached data (not the actual data).

    If it’s really due to DB caching, then that’s not likely to be the Varnish cache as much as object caching. You can test by going in via SFTP or command line and renaming wp-content/object-cache.php to object-cache.php.off

    If it IS Varnish, which is a bit unlikely given your description, then you could ask DreamHost tech support to edit your Varnish Config (VCL) and prevent the API pages from caching. That would require them to know what they are, of course… Do you know what pages the app is reading from? If it’s just from the JSON API then it’d be something like yourdomain.com/wp-json/APINAME/VERSION/ and that whole thing could be whitelisted.

Viewing 1 replies (of 1 total)
  • The topic ‘Cached Data problem’ is closed to new replies.