Added attach and detach methods to CacheWordHandler

Added attach and detach methods in cases where connect and disconnect aren't appropriate, such as with background services.