thread safety for cookiestore