Monday, 15 June 2020
  3 Replies
  3.1K Visits
please, could you write in this thread the instruction for my developer in order to:

  1. Rebuild a cache for a specific product / offer
  2. Rebuild a cache for all (update); the same function that you call when clicking on CACHE button

By the way, after MongoDB created its indexes, the system became very fast!
4 years ago
"Rebuild entire cache" is always a full rebuild.
4 years ago
Does the "rebuild entire cache" is it always a complete rebuild, or is it a differential?
4 years ago
There is a class

To rebuild entire cache you need to run following code

	$builder = new ProductsCacheBuilder;


To rebuild cache for specific products you need to run following code. The rebuild method accepts an integer, or an array of integers. Just make sure not to pass many product ids in a single call. Using an array of ~50 products should be fine.

If you have more that 50 products to refresh, you can always call into several chunks of ~50 products in separate calls.

	$builder = new ProductsCacheBuilder;

$pks = 1207; // The numeric product id or an array of numeric product ids


There are few more functions, which you should usually not require:

	// To delete some of the cache records

// To update some fields in the cache records matching a criteria, such as set stock = 100 for seller id = 234 etc.

If you need more details about these, you can see the code in the file: plugins/system/sellaciouscache/sellaciouscache.php
  • Page :
  • 1
There are no replies made for this post yet.
Be one of the first to reply to this post!
  • +1 (408) 821-8283
  • Email hello@sellacious.com