> >>       # reset cache file's status in case get_fh is
> >>       # called again, so it gets reevaluated:
> >>       $self->source_cache->{mtime} =
> >>         $self->source_cache->{exists} = undef;
> >
> > Am I missing something, or is this necessary? I'd rather get recently
> > (i.e., since the first time content was delivered by this request) stale
> > cache data than inconsistent cache data within the context of the same
> > request.
>
> The problem this works around is that the first time the cache->mtime
> and cache->exists methods are called, they remember their values in the
> cache->{mtime} and cache->{exists} properties, to avoid excessive
> reevaluation.  So if those methods are called again later on (i.e. on a
> second call to get_fh) they will still return the same values as the
> first time they were called, even if the mtime or existence of the cache
> has changed (which it definitely will since you're forcibly updating it).
>
This was a stupid mistake on my part, I didn't notice that "mtime" and
"exists" were method calls in the antecedent position of the 'if'
statement in your get_fh handler until late last night while reading the
code for Apache::AxKit::Cache, well after I posted my reply. Too much C
programming, or too little sleep, either way it's my fault.

The workaround is easy enough, but is there a reason why the "write"
method itself doesn't do this?

 -jtm

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to