Title: API Shell cache
Last modified: May 18, 2020

---

# API Shell cache

 *  Resolved [chercka](https://wordpress.org/support/users/chercka/)
 * (@chercka)
 * [6 years ago](https://wordpress.org/support/topic/api-shell-cache/)
 * Hi I’m using your API shell to connect to the API directly in PHP.
 * This is working very well, so thanks for that. However, is there a way to manage
   the caching level? I am seeing a delay in returned data updating and want to 
   turn the cache off altogether.
 * Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Jonathan Stegall](https://wordpress.org/support/users/jonathanstegall/)
 * (@jonathanstegall)
 * [6 years ago](https://wordpress.org/support/topic/api-shell-cache/#post-12855173)
 * I’m not sure, honestly. If you are loading the plugin’s Salesforce class, there’s
   an options array, and a key for whether or not to cache the API calls, which 
   is by default set to true. If you are calling that class directly, you could 
   probably set it to false. I certainly wouldn’t recommend doing this at all and
   I think it would end badly for you at some point, and I’ve not tested it, but
   you could try and see what it does. Here’s the options array in the Salesforce
   class: [https://github.com/MinnPost/object-sync-for-salesforce/blob/master/classes/salesforce.php#L81-L85](https://github.com/MinnPost/object-sync-for-salesforce/blob/master/classes/salesforce.php#L81-L85)
 *  Thread Starter [chercka](https://wordpress.org/support/users/chercka/)
 * (@chercka)
 * [6 years ago](https://wordpress.org/support/topic/api-shell-cache/#post-12855273)
 * Thanks Jonathan. This data comes back from the response:
 *  [from_cache] => 1
    [cached] => 1 [is_redo] =>
 * I would have thought updating the record in SF would cause it to purge the cache
   and serve up fresh data.
 *  Plugin Author [Jonathan Stegall](https://wordpress.org/support/users/jonathanstegall/)
 * (@jonathanstegall)
 * [6 years ago](https://wordpress.org/support/topic/api-shell-cache/#post-12855294)
 * It does not. For that to happen, I think you’d have to build some hooks within
   Salesforce itself.
 *  Thread Starter [chercka](https://wordpress.org/support/users/chercka/)
 * (@chercka)
 * [6 years ago](https://wordpress.org/support/topic/api-shell-cache/#post-12855316)
 * Thanks Jonathan – guess I’ll have to bite the bullet and use my own API shell.
 *  [afgarcia86](https://wordpress.org/support/users/afgarcia86/)
 * (@afgarcia86)
 * [5 years, 12 months ago](https://wordpress.org/support/topic/api-shell-cache/#post-12915634)
 * [@chercka](https://wordpress.org/support/users/chercka/) not sure if this is 
   what you are looking for but I was having a similar problem and doing this seems
   to work.
 * `$salesforce_api->query( $query, array('cache' => false) )`
    -  This reply was modified 5 years, 12 months ago by [afgarcia86](https://wordpress.org/support/users/afgarcia86/).
    -  This reply was modified 5 years, 12 months ago by [afgarcia86](https://wordpress.org/support/users/afgarcia86/).
 *  Thread Starter [chercka](https://wordpress.org/support/users/chercka/)
 * (@chercka)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/api-shell-cache/#post-12919178)
 * [@afgarcia86](https://wordpress.org/support/users/afgarcia86/) thank you so much,
   I really appreciate you taking the time to post this! Very helpful!
 *  [afgarcia86](https://wordpress.org/support/users/afgarcia86/)
 * (@afgarcia86)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/api-shell-cache/#post-12921485)
 * Glad it helped. This plugin has helped me alot.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘API Shell cache’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/object-sync-for-salesforce.svg)
 * [Object Sync for Salesforce](https://wordpress.org/plugins/object-sync-for-salesforce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/object-sync-for-salesforce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/object-sync-for-salesforce/)
 * [Active Topics](https://wordpress.org/support/plugin/object-sync-for-salesforce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/object-sync-for-salesforce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/object-sync-for-salesforce/reviews/)

 * 7 replies
 * 3 participants
 * Last reply from: [afgarcia86](https://wordpress.org/support/users/afgarcia86/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/api-shell-cache/#post-12921485)
 * Status: resolved