Cache functions in Hikashop

  • Posts: 15
  • Thank you received: 0
9 years 3 months ago #209792

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.1
-- PHP version -- : 3.54
-- Browser(s) name and version -- : Chrome
-- Error-message(debug-mod must be tuned on) -- : Website broken. 500 internal error

I can't find documentation on some Hikashop functions.
Could someone explain what the following functions does or point me to the place where I can see the documentation on all Hikashop class functions?
Thanks.

loadShippingCache()
setShippingCache()

Please Log in or Create an account to join the conversation.

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
9 years 3 months ago #209801

Hi,

There is no documentation on all HikaShop class functions.
These functions will cache the shipping methods calculated by shipping plugins on the checkout.
That will avoid the need for plugins to constantly call their corresponding web services in order to get the shipping rates even though nothing changed in the cart, user address, etc. That way, the shipping plugins will only call the web service of their shipping company when necessary.

The following user(s) said Thank You: prettysitepublishing

Please Log in or Create an account to join the conversation.

  • Posts: 15
  • Thank you received: 0
9 years 3 months ago #209914

Ohh kool. Thank you so much. That's really helpful. So if the shopping cart is updated, the setShippingCache() function is flushed or something?
And the loadShippingCache will return false?
Would I need to do a check to see if the cart is updated and then 'flush' the cache or flushing is already done every time the cart is updated?

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 3 months ago #209915

Hi,

These functions are internal to the shipping plugin allowing us to store the shipping data and not performing webservice calls for each pages.
These functions are just for the shipping plugins and just cache that data ; nothing else, nothing more.
And all is automatic and for sure, if the cart changed, the shipping cache is invalidated so the shipping plugins will re-call the webservices with the new cart.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: prettysitepublishing, jdouglas

Please Log in or Create an account to join the conversation.

Time to create page: 0.059 seconds
Powered by Kunena Forum