GithubHelp home page GithubHelp logo

advanced-post-cache's Introduction

advanced-post-cache

Overview

A WordPress plugin to cache post queries.

advanced-post-cache's People

Contributors

emrikol avatar ethitter avatar joshbetz avatar mikeyarce avatar mjangda avatar rebeccahum avatar spacedmonkey avatar westi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

advanced-post-cache's Issues

Create a tag

Hi there. Is there anyway that the repo could be updated with a release tag so that it can be installed via composer with a version number.

Bug: Metadata stale queries due to cache not being cleared

Problem

I have a WP_Query that has a meta_query like this:

$args   =   array(
    'numberposts'   => 10,
    'post_type'     => 'post',
    'meta_query'    => array(
        array(
            'key'       => 'custom_key_123',
            'compare'   => 'EXISTS',
        )
    )

);

Then, I use add_post_meta to add metadata to a new post - but my query is not updated.

Why this is happening

The APC plugin clears the cache on two actions right now:

add_action( 'clean_term_cache', 'clear_advanced_post_cache' );
add_action( 'clean_post_cache', 'clear_advanced_post_cache' );

Neither of these run when we add, update or remove metadata.

Composer support

Composer is a popular php dependancy manger. Many of automattic plugins already support it, such as jetpack and babble. Supporting it is simple, only requires having a composer.json file in the root of the project and for the repo not using git submodules.

It is extremely useful if you want to load plugins from github ๐Ÿ‘

Related #2

How to cache main query?

It looks this plugin do not cache main query, and I also want cache comments on every page. How cache every query?

Delay priority of posts_request filter to avoid plugin conflicts

We are running Advanced Post Cache as an mu plugin.

We have one plugin that creates custom SQL on the posts_request filter.

https://theeventscalendar.com/product/wordpress-events-calendar-pro/

Both plugins run at priority 10, meaning that Advanced Post Cache runs first because it is a mu plugin.

When Events Calendar runs the filter to alter the SQL statement, WP fails with a database error because of malformed SQL.

I switched the priority of posts_request in Advanced Post Cache to 11, which resolved the issue, as it is able to capture and cache the custom SQL statement generated by the plugin.

Plugins that use posts_request seem fairly rare, but I am wondering if the priority of that filter should be made later by default to try and capture instances where plugins want to muck with SQL statements.

Increasing number of queries?

Hi. I added in theme:

<?php echo get_num_queries(); ?>

But when I activate the plugin**, the number of queries increases?**

Shouldn't the number of queries be reduced? thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.