Is there any way to disabling caching for a single field for anonymous users? I ran into an interesting, but probably a common, problem. With caching turned on, stock is not updated immediately for anonymous users (which makes sense as that's the point of caching). However this results in a little bit of a UXWTF. When a product is out of stock, users are still shown that '1' is still available. It's only when they try to add it to the cart, they are met with a notice

The maximum quantity of 'product name' that can be purchased is 0.

I would still like to keep cache pretty much for everything else, but is there a way to disable caching of the available stock count?
Just an idea - in this case a workaround might be to hook a function after an order has been placed and then clean the cache programmatically.

You can use the hook_commerce_checkout_complete() and there call the cache_clear_all() function.