// clearUser removes a user from in memory cache
clearUser removes a user from in memory cache
// clearUser removes a user from in memory cache
func (s *Srv) clearUser(w http.ResponseWriter, r *http.Request) {
	token, err := utils.ParseCookie(r)
	if err != nil {
		log.Print(err)
		w.Header().Set("Content-Type", "application/json")
		json.NewEncoder(w).Encode("Unable to identify a currently cached user.")
		return
	}
	email := s.cache[token]
	delete(s.cache, token)
	w.Header().Set("Content-Type", "application/json")
	json.NewEncoder(w).Encode("User " + email + " removed from cache.")
	return
}
func ( s * Srv ) clearUser ( w http . ResponseWriter , r * http . Request ) { token , err := utils . ParseCookie ( r ) if err != nil { log . Print ( err ) w . Header ( ) . Set ( " " , " " ) json . NewEncoder ( w ) . Encode ( " " ) return } email := s . cache [ token ] delete ( s . cache , token ) w . Header ( ) . Set ( " " , " " ) json . NewEncoder ( w ) . Encode ( " " + email + " " ) return }
clearUser removes a user from in memory cache
clearUser removes a user from in memory cache