• Resolved hoy

    (@whereskarlo)


    Hello,

    I got an alert from Open Exchange Rates that I had almost used up my free quota. I noticed that since September 19, the daily API requests went up from 5 per day to 35 per day (This is not necessarily related to any plugin updates). My exchange rate cache was set to 60 minutes, meaning there should be no more than 24 API calls per day.

    I have a javascript from end function that converts the displayed currency using this plugin. However, it uses the get_conversion function and doesn’t talk directly with Open Exchange Rates.

    How is it possible that this plugin makes more calls to Open Exchange Rates than what is set in the plugin settings? I have now set the Exchange Rates Cache to expire after 120 minutes which should mean 12 requests per day, yet it goes over 12 according to the Open Exchange Rates API Usage dashboard.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor David Artiss

    (@dartiss)

    Hi.

    Theoretically, that shouldn’t happen. However, this is based on caching, using transients. If they’re getting cleared in the meantime then this can happen.

    When I next crack open the plugin, I’ll check to see if I can cause any other possible causes but, afaik, external sources could be behind this.

    Thread Starter hoy

    (@whereskarlo)

    Okay, I think this happened after I implemented the front end currency conversion which is on-demand and not cached. Before, get_conversion was only called during “order complete” so less frequent. Now it is called on every “single product” view. It isn’t a huge issue, setting it at 120 mins seems to result in around 20 calls per day which is within the quota.

    EDIT: If I run out of free API calls, will the plugin simply store the last available rates, or will it result in failure? If I run out of the free quota I was hoping to run with the last saved rates until the quota resets for the next month.

    • This reply was modified 1 year, 1 month ago by hoy.
    • This reply was modified 1 year, 1 month ago by hoy.
    • This reply was modified 1 year, 1 month ago by hoy.
    • This reply was modified 1 year, 1 month ago by hoy.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘API calls more frequent than cache settings’ is closed to new replies.