Fixed a stupid bug in the Cache implementation

See: http://stackoverflow.com/questions/4829576/javac-error-inconvertible-types-with-generics