samialabed / rlcache

Cache Manager using Reinforcement Learning
9 stars 5 forks source link

Observer architecture #9

Open samialabed opened 5 years ago

samialabed commented 5 years ago

Situations:

Questions:

samialabed commented 5 years ago

There is a lot of code duplication in cache_manager, and each strategy is calling observe with very similar arguments, making the code convoluted for no reason.

To make this framework generic for future work, make an observable interface.

And any class that implements it, it is up to it how it handles different observations (preferably has a separate method for each observation type)

The observation types can be limited to only 5: Hit, Miss, Invalidate, Set, Expire.