• Resolved chercka

    (@chercka)


    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

    (@jonathanstegall)

    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

    Thread Starter chercka

    (@chercka)

    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

    (@jonathanstegall)

    It does not. For that to happen, I think you’d have to build some hooks within Salesforce itself.

    Thread Starter chercka

    (@chercka)

    Thanks Jonathan – guess I’ll have to bite the bullet and use my own API shell.

    @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 3 years, 12 months ago by afgarcia86.
    • This reply was modified 3 years, 12 months ago by afgarcia86.
    Thread Starter chercka

    (@chercka)

    @afgarcia86 thank you so much, I really appreciate you taking the time to post this! Very helpful!

    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.