Can I have an App_Code section that compiles separately from the rest of the folder?

We have a website with a huge number of cached objects stored in static variables in App_Code. Whenever we push the App_Code change to our web servers, it processes the IIS pool and clears the cache. However, it does not clear the cache when we push out changes to the .aspx and .aspx.cs files.

I need to have a bunch of classes that will be updated several times a day in order to be able to reference in App_Code. I would like either a section of my App_Code, which I can update several times a day without looping IIS and clearing my cache, or the ability to refer to classes outside of App_Code from App_Code.

Is there a solution that fits my problem?

+3
source share
2 answers

App_Code or / bin / updates always recycle your application pools. If you say that you have a deployment scenario in which updates to the .aspx.cs file do not recycle your application pool, and if you can refer to the type of page itself, perhaps you can move your code to .aspx. cs files to prevent reuse. However, this can be an ugly choice.

One suggestion is to redesign your design to reduce the number of source code updates that are required on a daily basis. Perhaps use an XML repository or database, and create an application that is slightly more general and less prone to binary updates.

, , . , , , . , .

- . node, , node , node, .

- , .

, ?

+4

HttpRuntime.

HttpRuntime :

1) , . 29 , App_Code.

2) -. , - -, , -.

, - .

:

  • Memcached
  • Redis
  • Oracle Coherence ()

, .

+2

Source: https://habr.com/ru/post/1787789/


All Articles