Yes, this would be a good feature. Adding an option to set how often this block is updated. It would reduce unnecessary API calls on top of the performance benefits mentioned.
I managed to install the cloudflare/sdk by using the instructions from here: https://www.drupal.org/project/cloudflare_node_cc/issues/3378080#comment... ✨ Cloudflare SDK D10.1 compatibility Closed: won't fix
I then had to composer require drupal/purge and manually install the cloudflare module to get this to work.
Updated Patch to Work with Drupal 10.x.
In case you run into the same issue I don't think it has to be a solr config issue. I ran into the same problem because I created a Search API Page before I added any fields to the Search API Index. Make sure you have added fields to the index then you will need to edit and save the Search API Page again for these fields to be actually taken into account.
Added Patch to set opacity via CSS.
Fixed a few issues in the previous file.
Thanks David,
I fixed a few things. The location value was not being stored correctly.
I have also extended this formatter so that if no location is entered the formatter will output a list of all the stock for each locations in the store. Also added a setting to the formatter to set a max value. Stock above this max value will display for example as 100+ instead of the actual stock value.