caching

Minimalistic PHP template engine with caching but not Smarty?

There are loads of questions for "the right" PHP template engine, but none of them is focused on caching. Does anybody know a lightweight, high-quality, PHP 5 based template engine that does the following out of the box: Low-level templating functions (Replacements, loops, and filtering, maybe conditionals) Caching of the parsed resul...

JBoss: Authentication caches wrong login credentials

I am using JBoss AS 4.2.3 JBossSeam 2.1 My Problem is that I can login/logout with different users as long as I do not enter a wrong password for one user. If this happens it is not possible to authenticate any user. Authentication always fails. If I delete the browser cookies everything works fine. I have tried to set DefaultCacheTim...

Delete a header in PHP

To allow caching a PHP generated file, I want to make sure, that the 'Pragma: no-cache' header is not set. However, how do I delete a possibly already set header? That is, it could be possible, that somewhere in the code someone wrote header('Pragma: no-cache'); and now I want to make sure, the header is not sent. Is it sufficient to d...

Does NHibernate SysCache work in a non-web app?

I know SysCache uses ASP caching under the hood, but since I'm not aware of the implementation of the ASP cache (and if it depends on anything IIS), I was wondering if SysCache would work in a non-web application (like a Windows Service)? Activating it and using NHprofiler seems to show it is not. ...

Is frozenset adequate for caching of symmetric input data in a python dict?

The title more or less says it all: I have a function which takes symmetric input in two arguments, e.g. something like def f(a1, a2): return heavy_stuff(abs(a1 - a2)) Now, I want to introduce some caching method. Would it be correct / pythonic / reasonably efficient to do something like this: cache = {} def g(a1, a2): fs =f...

Have you used Intersystems Caché? What is your experience?

I came across few claims that usage of CacheDB instead of prooven RDBMS. But I couldn't understand how it is better than RDBMS? if so, why do they prefixed with Cache? Is it RDBMS or Caché server? Could you write brief notes about the use-case in your project? ...

How to clear browser's cache from server side?

I have to create a web application that deals with user's sensitive information. I need to immediately clear the browser's cache after user logs out since cached data would be vulnerable. Client's browser should be enforced to clear the Cache from server side. Also all cache policies must be exposed to the client from the server side. I...

Cache the result of a MySQLdb database query in memory

Our application fetches the correct database server from a pool of database servers. So each query is really 2 queries, and they look like this: Fetch the correct DB server Execute the query We do this so we can take DB servers online and offline as necessary, as well as for load-balancing. But the first query seems like it could b...

Cache in ASP.NET

Cache.Insert("lstDownload", GetListDownload(), null, DateTime.Now.AddDays(1), TimeSpan.Zero); When will cache be exprired? What will we receive when cache expired? ...

ASP.NET Caching : Good As Well As Bad ! Page shows old content!

I have an ASP.NET website where i have implemented page level caching using the OutPutCache directive.This boosted the page performance.My pages has few parts(Some buttons,links and labels) which are specific to the logged in user.If user is not logged in,they will see different links.Now Since i implemented the page level caching,Even a...

Cached Property: Easier way?

I have a object with properties that are expensive to compute, so they are only calculated on first access and then cached. private List<Note> notes; public List<Note> Notes { get { if (this.notes == null) { this.notes = CalcNotes(); } return this.note...

How to skip interstitial in a django view if a user hits the back button?

I have an application with an interstitial page to hold the user while an intensive operation runs in the background (takes anywhere from 30 secs to 1 minute). Once the operation is done, the user is redirected to the results page. Once on the result page, typical user behavior is to hit the 'back' button to perform the operation on a d...

replay in django + apcahce + mod_wsgi ??

I have a simple django page that has a counter on it. I use Apache2 with mod_wsgi to serve it. First, when I enter this page, the counter shows 0, as it should. The second time when I enter the page the counter shows 1 - again, it is the right behavior. The problem begins now, cause when I enter this page the third time, I get 0 again. ...

Cache Wrapper with expressions

I dont know if is possible. I want a class to encapsulate all Cache of my site. I thinking about the best way to do this to avoid conflict with keys. My first idea is something like this: public static TResult Cachear<TResult>(this Cache cache, Expression<Func<TResult>> funcao) { string chave = funcao.ToString(); ...

XmlDocument caching memory usage

We are seeing very high memory usage in .NET web applications which use XmlDocument. A small (~5MB) XML document is loaded into an XmlDocument object and stored in HttpContext.Cache for easy querying and XSLT transformation on each page load. The XML is modified on disk periodically so a cache has a dependency on the file. Such an appli...

Adding js to a drupal node form

In Drupal you can create your own nodetype in a custom module. Doing this you get to create your own form which is all very nice. However if you want to add js the form things get a bit more tricky. If you add the js in the form, the js will only be added form the form when it is loaded. If the user would post the form with validation e...

Asp.NET MVC Html.TextBox refresh problem

hello, i have a problem with asp.net mvc 2 and the html.textboxfor helper. i use the follow code in a form: <%= Html.TextBoxFor(model => model.Zip, new { @class = "txt", id = "zip", tabindex = 1 })%> when the user send the form, i validate the zipcode, when the zip is invalid we set the corrected zip. my model has the corrected zip,...

NHibernate second-level caching of collections

I am having trouble working out how to correctly cache one-to-many or many-to-many relationships in NHibernate. For example, an office class may have the following mapping: public OfficeDbMap() { ... HasMany(x => x.Employees) .Cache.NonStrictReadWrite(); } However I find that when I delete an employee (without specifi...

how to override cache with css file

hi folks, I'm doing some things with a facebook widget. They cache the css files, and I'm trying to override the cache. http://wiki.developers.facebook.com/index.php/Fb:fan The instructions say: Note: To provide you with better performance, we cache your stylesheet. If you update your stylesheet, you should use a cachebreaker in the U...

Is it possible in Oracle SQLDeveloper to prefetch certain tables’ metadata and keep it cached locally ?

I am working on a remote database which has several master tables. the meta-data & the actual data in these tables changes rarely. When querying DB involving these tables and using certain functions (Ex: ctrl+space to auto-complete a table/column name), it takes too long to query the remote DB to fetch this data since its not cached loca...