Logging and cache/DB update