Adding tests for cache.

	Possible optimization of cache tab

	Changed CacheItemModel properties to nullable.
        Corresponding change in Cache.cs

        Moving assignment of two values outside a loop.
        Expanding try/catch.