caching

Cache-manifest a login-protected page

How can I have a user authenticate and then download an offline application created specifically for them? I'm creating a public/private key encryption system for offline use and each user needs to be able to login and "download" their encryption/decryption page (app.php) using a form. This form dumps them on their app.php page, served ...

Can Html.RenderAction be used as ASP.NET MVC 2.0's "donut caching"?

I'm not at a development system where I can test this. If I output cache a view, and inside that view have a Html.RenderAction that loads some html from a separate action, would that newly pulled in HTML be cached or would Html.RenderAction run every time, thus acting as donut caching for ASP.NET MVC 2.0? ...

Stream to file while returning a WCF stream?

I have a WCF service that streams large files (100MB+) from a remote FTP server. [ServiceContract] public interface IStreamService { [OperationContract] Stream GetDataFromFtp(); } public class StreamService : IStreamService { public Stream GetDataFromFtp() { Stream ftpStream = Retr(...); return ftpStream...

Unable to read cache file (symfony.routing.data.cache)

Hi, We are having some troubles when many people is visiting our site at the same time. We are using Symfony 1.2.7 + Memcached on Amazon Web Services. We have 2 instances running Apache with load balancing. Database is MySQL and it is running in a separate instance that stores de web files (the other instances are mounting these files u...

Mysql is taking .7 seconds to "copy into tmp table". What is the best way to cache this kind of query?

I have a group-by query that is very fast when it comes to indexing, joining, sending the results etc. Unfortunately, mysql spends 99.6% of its time "copying to tmp table" when I profile it. I am at a loss as to how I can get mysql to perform better on its own. This group by query essentially finds the number of entities for the top 20 ...

Caching the results of a function with two parameters in Python

I have a method with two parameters that does some complex computation. It is called very often with the same parameters, so I am using a dictionary for caching. Currently this looks something like this: def foo(self, a, b): params = frozenset([a, b]) if not params in self._cache: self._cache[params] = self._calculate(a,...

How do you make sure the client gets the 404 error status?

This is actually a two-part question. My server is set up to redirect all 404 errors within Apache itself to index.php?404. Does this still send a 404 status message to the client to tell them the page was not found, and then display my customized 404 error page? Because I also have processes within other pages. While the page itself may...

nhibernate, load-balancing, failover, and caching

We have a server that uses NHibernate, and we would like to load balance multiple instances of this server. Our database is big, ~100 GB. If we use a distributed second level cache like memcached or sharedcache, are there still potential data integrity issues? And, why doesn't the first level cache need to be distributed? Also, how ...

FileNotFoundException when using Hadoop distributed cache

this time someone should please relpy i am struggling with running my code using distributed cahe. i have already the files on hdfs but when i run this code : import java.awt.image.BufferedImage; import java.awt.image.DataBufferByte; import java.awt.image.Raster; import java.io.BufferedReader; import java.io.ByteArrayInputStream; impor...

Caching application data in Grails

Hi, in order to keep certain application variables I may need to change when the application is running without having to restart it, I'm thinking in implementing a Grails service and a Quartz job so every X minutes, the service reloads the entire "parameters" table - and I query the service for a parameter's value. Now, is this a good ...

Rails Automatic Cache Expiration

Does Rails do any kind of automatic (time-based?) caching expiration for pages/actions/fragments? This seems like such a simple question, yet I can't find it anywhere (or maybe I'm looking in the wrong place). ...

Rails Caching (content vs. page/action/etc)

What's content caching (like this plugin here: http://blog.codahale.com/2006/04/10/content-only-caching-for-rails/) vs page/action/fragment caching that Rails has built in? I'd like to do caching on my Rails application, but I don't quite know which type to use. My application has mostly dynamic, user specific data on every page. Is cac...

Is it possible to cache by membership role in asp.net mvc?

We have a bunch of pages that get really high traffic, and as such we have the following in web.config: <caching> <outputCacheSettings> <outputCacheProfiles> <add name="defaultCache" duration="900" varyByParam="*" location="Any"/> </outputCacheProfiles> </outputCacheSettings> </caching> and the following attribute on...

Convert this .htaccess cache to nginx rewrite rules

Hey, I'm looking for getting this .htaccess file converted to NginX rewrite rules. It's generated by the wordpress-plugin version of CSS-JS-Booster Any help would be greatly appreciated :) #CSS-JS-Booster Start################################################# #Turn ETagging off FileETag none #Turn ETagging on for MHTML-file <FilesMatc...

Multiple std::vectors to fix cache problem?

I have a std::vector<DOUBLEPOINT> I'm making an application with bezier curves and the results are shown in real time. I convert bezier points into a bunch of short lines. I store the coordinates for the small lines in the vector above. Here is my issue:. When the size of my vector exceeds a cache line, things get very slow very fast. I...

Dealing with conflicting javascript libraries in a Rails 3 app

Id like to understand the best approach when using multiple (and conflicting) javascript libraries in a rails 3 app. Before the js conflict was raised, I used the application.html.erb template to define all javascript libraries template on all pages with: <%= javascript_include_tag :all %> I intended to cache all the js files into one...

Intersystems Caché - Class for Data Encryption

I wonder which class is the class that I use to encrypt data (first time string data) and the best method of encryption (among those supported by caché). Must generate a strong encryption for data in my project. Any help is welcome. If someone can show me some example, I'll be even more grateful. ...

How would you implement twitter using a noSQL kind of DB?

It seems like implementing web-app like twitter/facebook-wall needs 1 huge "feeds" relational table (+ a user table) and an awesome caching mechanism.. ( can you recommend one? ) my main question is, how would you implement such a "feature" using a non-relational DB, e.g. a key/value kind of DB? Obviously, I had like to support the amo...

.NET cache providers that support streaming?

Does anyone know any cache providers for .NET that support streaming data directly in/out by key, rather than serializing/deserializing objects? I was rather hoping AppFabric (Velocity) would, but it only appears to deal with objects like the built-in ASP.NET cache. ...

Drupal authcache - load dynamic content through ajax

I'm using Drupal 6 with authcache. I've read that you can load dynamic content by using ajax, even when the whole page is cached with authcache. In my template files, I've used this code to show Edit and Delete links: <?php if ($user->uid == $node->uid || in_array('moderator', array_values($user->roles))|| $user->uid == 1): ?> <span cla...