fbpx
0
Hi,
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!
Attachments (1)
Replies (3)
Izhar Aazmi Accepted Answer Pending Moderation
Team
  1. Replied 2 weeks ago
  2. #Permalink
There is a class
\Sellacious\Cache\Builder\ProductsCacheBuilder


To rebuild entire cache you need to run following code

	$builder = new ProductsCacheBuilder;

$builder->build();



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

$builder->rebuild($pks);



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

	// To delete some of the cache records
$builder->remove($filter);

// To update some fields in the cache records matching a criteria, such as set stock = 100 for seller id = 234 etc.
$builder->update($batch);


If you need more details about these, you can see the code in the file: plugins/system/sellaciouscache/sellaciouscache.php
bindCommerce Accepted Answer Pending Moderation
  1. Replied 2 weeks ago
  2. #Permalink
Does the "rebuild entire cache" is it always a complete rebuild, or is it a differential?
Izhar Aazmi Accepted Answer Pending Moderation
Team
  1. Replied 2 weeks ago
  2. #Permalink
"Rebuild entire cache" is always a full rebuild.
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.
Support is Online
Support Hours
Monday To Saturday
From 09:00 To 21:00 IST
Sellacious Time 00:00:00

Login

?
?