pantheon-systems / solr-power

A WordPress plugin to connect to Pantheon's Apache Solr search infrastructure, or your own!
https://wordpress.org/plugins/solr-power/
GNU General Public License v2.0
125 stars 60 forks source link

[BUGS-6792] clear_object_cache handles protected cache property (OCP) #611

Closed pwtyler closed 10 months ago

pwtyler commented 10 months ago

Plugin was written with wp-redis in mind, but OCP's cache property is private where wp-redis is not.

Fixes #610

Tested on solr-power site with both OCP and wp-redis installed (else debug statements in below output excised from final version).

OCP

philtyler@Phils-MacBook-Pro solr-power % terminus remote:wp ... -- solr index
 [warning] This environment is in read-only Git mode. If you want to make changes to the codebase of this site (e.g. updating modules or plugins), you will need to toggle into read/write SFTP mode first.

Starting batch 1 of 1 at 0:00:00 elapsed time (0 indexed, 0 failed, 1 remaining)

Submitted 'Let's Go Car Shopping!' (1) to the index.
Property group_ops DNE!1
Property stats DNE!1
Property memcache_debug DNE!1
Property cache is private or protected1
Success: Indexed 1 of 1 posts.
 [notice] Command: ... -- wp solr index [Exit: 0]

Wp Redis

philtyler@Phils-MacBook-Pro solr-power % terminus remote:wp ... -- solr index

Starting batch 1 of 1 at 0:00:00 elapsed time (0 indexed, 0 failed, 1 remaining)

Submitted 'Let's Go Car Shopping!' (1) to the index.
Property group_ops DNE!1
Property stats DNE!1
Property memcache_debug DNE!1
Success: Indexed 1 of 1 posts.
 [notice] Command: ... -- wp solr index [Exit: 0]