I have a piece of data, a simple string containing the name of the server to which the SharePoint solution is being deployed, which I retrieve from the configuration repository in a helper method in the shared DLL used throughout my solution. This helper method is used in all of my custom pages and web parts to create multiple URLs, etc.
I would like to save this line and prevent it from being repeatedly retrieved from the configuration repository. The installation of My Sharepoint is currently located on the same server, but in the near future it will be transferred to the SharePoint server farm, so a simple definition of the server name for the current request, etc. Not an option. I looked at caching as described in the best practices for SharePoint , but if I do not use a coherent cache, such as NCache or Velocity / AppFrabric , I will again have problems when switching to a server, a farm occurs. Given that this is the only line, adding a complete caching solution like Velocity seems redundant.
Does anyone have any suggestions on the best way to save this data? Did I miss something obvious here?
Thank you MagicAndi
source
share