separated the cache mechanism from Model
updated