41

The MSDN documentation on the SPCache leaves very much to the imagination. But since it sounds interesting, I'm wondering whether it is a farm-wide cache. Does anyone know?

Currently I'm caching using the System.Web.Cache, but this makes flushing cache entries across the farm difficult, so a built-in farm-wide solution would be quite preferable.

Is the SPCache the same as the "object cache"?

ScarePoint
  • 975
  • 11
  • 27
  • Related question: http://stackoverflow.com/questions/5447317/spcache-vs-httpruntime-cache. It would be interesting to know all the details. – Kit Menke Apr 06 '11 at 21:29
  • @Kit Interesting, didn't see that. Curious that Michael thinks it is well documented. :) – ScarePoint Apr 07 '11 at 06:17

2 Answers2

24

Well, compared to the usual SharePoint documentation it's pretty well documented :)

I'm pretty sure it's not Farm Wide. Essentially it is a thread-safe Dictionary in memory of the server that uses it, and I have not seen anything that synchronizes it across the farm (I was planning to build my own object-cache for that purpose at some point).

Michael Stum
  • 868
  • 2
  • 15
  • 26
14

If you want a multi-server high performance cache consider using the AppFabric cache.

Todd Carter
  • 141
  • 2