Removed duplicate lines from views test.
Added caching to database.