Hi guys,
I was wondering if someone could please help me with a cache related problem. We use TinyMCE image manager on our portal and have integrated a function which builds an image list within the image control box. The image building is a lengthy task and is completed inside its own project. I use the DataCache object to cache the list inside the project and then the Http cache to store the list within the website. Here is the function that handles the image rebuild (it’s outside of the website):
Public Function GetTinyMceCache(ByVal pid As Integer) As String
Dim tmpC As System.Web.Caching.Cache = HttpContext.Current.Cache
strCache = DataCache.GetCache(ImageListDataCacheKey)
' Firstly, we need to check if the folder/image list is in the cache and that we r not doing a specific rebuild
If strCache Is Nothing Then
BuildTinyMceCache(pid)
End If
Try
Return strCache.ToString
'Return DataCache.GetCache(ImageListDataCacheKey).ToString
Catch ex As Exception
Dim msg = String.Format("Failed to Get Tiny MCE Image List: ", ex.Message)
Return msg
End Try
End Function
The calling function within the website simple checks to see whether the list is within the Http cache and if not, calls this function. I have successfully been able to cache the imagelist on my local machine but when I put the code live, the list is only added momentarily and then kicked out. The list size is significant (1.3 Mb) which I think to be the problem. When I cut down the list on the list site, I was able to successfully add the list to the cache. Also, when I checked the limit on the http cache, we were well below that.
Can anyone suggest a method by which I can increase the size limit on the http cache element? Ort how I could successfully cache this sort of list.
Any help with this problem would be much appreciated!
Paul