开发者

Is there a way to share an in-memory object between multiple websites?

We have about 70 sites on our server that use same application (with different Application Pools) and they use for example a shared skin file. So is th开发者_开发问答ere a way to load this file to memory and share for all applications? what I mean is to sharing cache in multiple websites to decrease pressure on server. Thanks in advance


May be I'm not answering your question directly, but you problem has better solution. The best place for CSS, images, static content is either CDN (content delivery network) or standalone server.

At first it improves time of page loading (since per browser convention there only 2 opened threads to single domain). So placing onto standalone server allows browser simultaneously load content from you server and CDN.

At second it solves your problem since application doesn't spent time to dispatch requests of static data


I agree with Dwefy. But if you need to share dynamic content in memory have a look at memcached


Unless you use a shared cache such as memcached then no, there's no way to do this. Even using a shared cache you're still going to be creating temporary objects in each site when you retrieve the item from the cache.

Best to store this somewhere on disk and just share the file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜