cache bug fixed

This commit is contained in:
Lunny Xiao 2013-09-25 10:20:07 +08:00
parent 9d676ebddd
commit f148dee404
1 changed files with 2 additions and 2 deletions

View File

@ -34,8 +34,8 @@ func (s *MemoryStore) Put(key, value interface{}) error {
}
func (s *MemoryStore) Get(key interface{}) (interface{}, error) {
s.mutex.Rlock()
defer s.mutex.UnRlock()
s.mutex.RLock()
defer s.mutex.RUnlock()
//fmt.Println("before get store:", s.store)
if v, ok := s.store[key]; ok {
return v, nil