Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Premium Support
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Free Support
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
Tagged: 8.6.1
- This topic has 3 replies, 2 voices, and was last updated 9 years, 3 months ago by
Darrin Goodman.
-
AuthorPosts
-
03/29/2017 at 2:53 pm #417816
Darrin Goodman
ParticipantHi Steven,
Several of our county offices have recently moved their websites under our WP Multisite umbrella, so their website addresses have completely changed. Our online directory needs to be updated to reflect the change of website addresses for various individuals and county listings.
Instead of changing all of the website addresses manually through Connections, I decided to use an SQL statement to change all of the records. When I go in through the Connections interface and edit someone’s entry, I can see that the change has been made, but the website does not reflect these changes. Does WordPress or Connections cache records or is there something else that I need to do in order to make this change take effect? I’ll post my SQL UPDATE statement in the next message.
Thank you!
03/29/2017 at 2:58 pm #417817Darrin Goodman
ParticipantThis reply has been marked as private.03/30/2017 at 9:07 am #418100Steven Zahm
Keymaster@ Darrin
re: So it’s weird that in the editing interface through Connections that the changes appear to have taken effect, but no change has taken effect on the website. Any ideas?
That is because much of the data, such as links, is cached in the primary
{wpdb_prefix}_connectionstable. When entry data is shown, it uses the cached objects vs the actual data in the tables. This greatly reduced queries, page load time and server resources required. When you edit an entry the data is saved in the table and the object cache is updated.Right now, there is not an easy way to update this cache. The core Connections code is undergoing a massive change (starting with the recently release of 8.6) which will make it possible to create a tool to upgrade the cached objects without having to edit the entry.
Using this code snippet should disable the object caches:
function cn_disable_output_cache( $cached ) { return FALSE; } function cn_enable_output_cache() { remove_filter( 'cn_address_cached', 'cn_disable_output_cache' ); remove_filter( 'cn_phone_cached', 'cn_disable_output_cache' ); remove_filter( 'cn_email_cached', 'cn_disable_output_cache' ); remove_filter( 'cn_messenger_cached', 'cn_disable_output_cache' ); remove_filter( 'cn_social_network_cached', 'cn_disable_output_cache' ); remove_filter( 'cn_link_cached', 'cn_disable_output_cache' ); remove_filter( 'cn_date_cached', 'cn_disable_output_cache' ); } add_filter( 'cn_address_cached', 'cn_disable_output_cache' ); add_filter( 'cn_phone_cached', 'cn_disable_output_cache' ); add_filter( 'cn_email_cached', 'cn_disable_output_cache' ); add_filter( 'cn_messenger_cached', 'cn_disable_output_cache' ); add_filter( 'cn_social_network_cached', 'cn_disable_output_cache' ); add_filter( 'cn_link_cached', 'cn_disable_output_cache' ); add_filter( 'cn_date_cached', 'cn_disable_output_cache' ); add_action( 'cn_update-entry', 'cn_enable_output_cache'); add_action( 'cn_save-entry', 'cn_enable_output_cache');Use the Code Snippets plugin to add this snippet to run on the site’s frontend. It’s been awhile since I’ve tested it, let me know how it goes.
Hope this helps!
05/08/2017 at 11:05 am #422187Darrin Goodman
ParticipantHi Steven,
Sorry for my delayed response on this. Thank you for letting me know about the caching. I have seen fields in the DB that looked strange to me in the past and now this explains what I have been seeing – cached data. It makes sense though and seems like it might reduce page load times. I’m not sure that I want to gamble on breaking anything by turning it off – I appreciate you providing that snippet of code though. Thank you!
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.
