Windows Azure Caching: Difference between revisions

Content deleted Content added
Rothja (talk | contribs)
Code examples: Modified the code samples to correct errors and make them easier to read and understand
Rothja (talk | contribs)
Code examples: Corrected code example where a null return value would have caused the casting to crash
Line 59:
{
// Attempt to retrieve the user data from the cache:
dataTypeobject datadataObject = (dataType)Cache.Get(userid) ;
dataType data = null;
 
if (datadataObject =!= null) {
data = (dataType)dataObject;
else
{
// If it doesn't exist in the cache, retrieve it from the database:
data = GetUserDataFromDatabase("SELECT * FROM users WHERE userid = @userid", userid);