Varnish Storage API

Stephan Richter stephan.richter at gmail.com
Wed Jul 14 02:36:21 CEST 2010


Hi Poul,

thanks for your response as well.

On Tuesday, July 13, 2010, Poul-Henning Kamp wrote:
> In message <AE2FA490-99F8-4CFA-AD2A-27D6E518DF7B at crucially.net>, Artur
> Bergman 
> 
> writes:
> >> I have skimmed the code base a to determine the API to use to insert  
> >> data into
> >> the cache but could not find it. 
> 
> There is no such API.

So inserting into the cache is spread all over? (I would not be surprised. I 
guess you keep a store plus one or more indexes to find the content efficiently.)

>
> >Could you use a local http server and just pull from it?
> 
> That is a much better idea for a large number of reasons, in particular
> testing & development:
>
> Write a process which receives the data via M/C, when an object is
> complete, it sends a HTTP request to Varnish which causes Varnish
> fetch the object by treating the process as a backend.
> 
> I can all but guarantee you that this is the fastest and most
> efficient way to make it work.

I could not agree more! :-) I am glad that you agree with me. The advantages I 
see are:

1. No bugs in the cache insertion code.
2. Clear division of concerns (M/C versus caching)
3. No proprietary protocol to communicate across processes (just HTTP).
4. No proprietary C code to maintain. (I am using Python for the rest of the 
system.)

If you can come up with more advantages, I would love to hear them, so I can 
strengthen my argument.

Regards,
Stephan
-- 
Entrepreneur and Software Geek
Google me. "Zope Stephan Richter"




More information about the varnish-dev mailing list