Last post Nov 28, 2008 02:32 AM by anup_daware
Nov 24, 2008 09:50 AM|MartinMade|LINK
I am working on a existing web application, where the resources are stored in the database instead of typical .resx files. The resources are accessed using the customized ASP.NET Localization Resource Provider.
Following is the entry in the web.config:
<globalization resourceProviderFactoryType="ABC.XYZ.Web.Localization.DBResourceProviderFactory, ABC.XYZ.Web." culture="auto" uiCulture="pt-BR"/>
While I have understood how the ResourceProviderFactory and ResourceProvider works. I am now able to understand how the caching is implemented in this scenario.
When I caecked my ‘C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\<Application Name>’ I found ‘.resources’ files created there.
So, I assume the resources fetched from the database are cached in .resources file. One resource file for each resource group.
My question is in this scenario how the caching is achieved, that is, how the .resource files are created in Temporary ASP.NET Files?
How to invalidate this cache and force app to get resources from database and cache again?
Your comments suggestions will be very helpful,
Nov 25, 2008 07:04 AM|shivamG|LINK
I think because neither the IResourceProvider nor the IImplicitResourceProvider have a ClearResourceCache method you can call. For resources I don't thing there would be that many changes in the database anyway. Maybe only when new pages ar added or when
a page is modified.
Nov 28, 2008 02:24 AM|MartinMade|LINK
I am still waiting for the answers! Any help?
Nov 28, 2008 02:32 AM|anup_daware|LINK
As far as my knowledge goes on it, if you are using data driven resources, the .resources files will not be created, unless you do something special.
Check if you have some .resx files present in the solution that are causing the .resource files to be created in the temp asp.net folder
Hope this helps,