Configuring Store Database Cache
When a user opens a store page, an API call is sent from store to Billing database to fetch the information that must be shown at this store page (for example, list of available languages, list of service plans, etc.). In this case, each time such call is sent, the time is spent to form a call, send it, then parse it at Billing core side, then get info from Billing database, form response, send it, and finally parse it at store side.
Caching API calls sent by store allows storing the previously requested information at a store side, without the need to send calls to Billing. This significantly saves time spent for requests processing and improves store performance.
To store API calls at Billing store side, SQLite database is used.
Billing installer deploys SQLite together with the online store. No additional database configuration is needed.
Note: Store database cache is enabled by default. API calls are kept during 1440 min, by default.
To set up store database cache:
- Log in to Billing PCP.
- Go to Products > Online Store > More and click Advanced Settings.
- Select General Parameter Section
CACHE
. - Select
USE_BM_CACHE
parameter. Click Edit. Select 'true' from the Value list. Click Save. -
Select
TIMELIFE_CACHE_BM
parameter.- To reset to default the period API calls are kept cached, click Set Default.
- To change cache lifetime duration, click Edit. Enter the new duration (in minutes) into the Value field. Click Save.
- Synchronize store.
Note: Each store synchronization resets cache.