Added a generic refcount to client-side cachedbuffer