Added weak db link caching - doesn't seem to work properly yet