Can I synclock effectively on an object stored in the cache?
Like:
SyncLock System.Web.HttpContext.Current.Cache("Some Object")
'do some stuff that is threadsafe on this cached object'
End SyncLock
Will this stop another thread from modifying that cached object?
For the standard cache, yes. But it won't stop another thread replacing the object in the cache - you'll need to use a separate sync object for that. And if you happen to be using a distributed cache (e.g. Velocity) then it's not necessarily reliable either.