AfterGlow
AfterGlow

Reputation: 227

Caching a Dynamic Portal

Currently I am working on a large portal website and all information it shows are mainly user specific.Now we are experiencing some performance issues and have to address it as soon as possible as the number of users keep increasing.I heard about caching in mvc4 and i want to know how effective it is in a dynamic sites like portal and what kind of caching method should i adopt.Is there any chance of backfire ?

Upvotes: 0

Views: 36

Answers (1)

Alex Art.
Alex Art.

Reputation: 8781

In general it is important to understand that caching is about bringing resources closer to the consumer

In order to choose what caching method to use, you should analyze your portal potential bottlenecks.

If for example, your bottleneck is a remote database - you could use some local database that runs on the same machine with your portal (embedded data base/ in memory storage / key-value storage and etc.) or using Session do cache some user data - in this case resource consumer is your MVC application.

In one of our the projects, we had the similar issue that you are describing in your question. In this case the bottleneck was the remote database, so we implemented SessionState provider with Redis DB (we couldn't use default session provider because of load ballancer) and it solved the issue for us.

Another caching may be performed to bring data closer to the end user - in this case you could use MVC OutputCache so you could cache data on client side, server side, proxy or all of them together.

Something that i learned from my own mistakes is - don't try to solve the issue that is not yet existing - you can spend a month now trying to implement some complex caching solutions with setting up a local high-performance database that synchronizes with the remote one... but there won't be any performance issues on this particular application level.

If your application architecture is correct it will allow you to add caching later without any major implications. So i would suggest that you spend your resources on correct application design and implementation.

Upvotes: 1

Related Questions