• Resolved Rakesh

    (@rakesh93)


    I want that same query should be picked from cache on different pages, but right now it is not working even after enabling Database Cache in w3tc plugin. Same query is running at two pages, it should be picked from last page cache.

    I have checked in “dbcache-queries.log” file and same query is present there for two pages.

    • This topic was modified 4 years, 1 month ago by Rakesh.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @rakesh93

    Thank you for your inquiry and I am happy to assist you with this.
    W3 Total Cache is only caching the queries and that is not dependant on the query but on the page the query is present.
    I am not sure what the issue is here. Can you please share more details and elaborate on the issue you are experiencing.
    Thanks!

    Thread Starter Rakesh

    (@rakesh93)

    I mean there is one query, i.e. present on two pages.
    For example, if I run first page then it should be cached.
    And at the second page that query should not hit the DB, instead of that it should come from cache of last page.
    Is that possible using w3tc cache plugin?

    I enable Database Cache but same query hitting database on first load on both pages.

    Can we manually cache any query? If yes, then how we can do it?

    • This reply was modified 4 years, 1 month ago by Rakesh.
    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @rakesh93

    Thank you for the clarification.
    This is expected behavior. If you want to exclude a specific page from caching you can add it to Performance>Database Cache>Never cache the following pages:
    I understand your question but this is how caching works.
    To answer your last question, no you cannot manually cache any query with W3 Total Cache you can only specify which queries should be ignored in the Database Cache settings.
    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Same query visible in cache on two pages after enable Database Cache in W3TC’ is closed to new replies.