Fixed bug in cache controller that was causing session handler to return NoneType
Fixed bugs in cache control