Search squid archive

Re: StoreID and concurrency?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/6/2013 4:25 PM, csn233 wrote:
On Wed, Jun 5, 2013 at 11:57 PM, Eliezer Croitoru <eliezer@xxxxxxxxxxxx> wrote:
StoreID is not related directly to cache_dir so it's not suppose to affect
dirty cache_dir.

StoreID uses the output from the helper as the key to store the cached
copy in cache_dir, does it not? So if the helper generates one key for
the video and a *different* key for the same video next time (if I
change the helper output), it will lead to inconsistency for that same
video, will it not? Particularly relevant to YT which splits a video
into parts (ranges), where each part gets its own key. So if I change
the key halfway while the video is playing, things get confusing.
No it dosnt matter the only *thing* that will happen is that the two videos will be served but not from cache.


BTW, with reference to your example:

#./new_helper.rb
http://freefr.dl.sourceforge.net/project/vlc/2.0.5/win32/vlc-2.0.5-win32.exe
OK store-id=http://dl.sourceforge.net.squid.internal/project/vlc/2.0.5/win32/vlc-2.0.5-win32.exe

Maybe a different example would demonstrate the usefulness of StoreID
a bit more. In your example above, the original URL is of a fixed
format which be cached by default by Squid. StoreID would not provide
any added value there. The URL-rewrite examples in StoreURL wiki would
be better in the sense that they actually show a re-write of an
un-cacheable URL into a cache-able one.
This is the best example to demonstrate how CDN urls are being and can be used.
Right the next couple urls will result in the same storeID
http://freefr.dl.sourceforge.net/project/vlc/2.0.5/win32/vlc-2.0.5-win32.exe
http://freefr3.dl.sourceforge.net/project/vlc/2.0.5/win32/vlc-2.0.5-win32.exe
http://freefr2.dl.sourceforge.net/project/vlc/2.0.5/win32/vlc-2.0.5-win32.exe
http://freefr1.dl.sourceforge.net/project/vlc/2.0.5/win32/vlc-2.0.5-win32.exe
OK store-id=http://dl.sourceforge.net.squid.internal/project/vlc/2.0.5/win32/vlc-2.0.5-win32.exe There is not such thing as un-cachable from the proxy point of view but rather what the proxy prefers to not cache.
Youtube example is a really good and complex one.
it was explained long before I wrote my helper and code.
The reason you might not understand it is that you need to learn a bit more to make sure you understand what StoreID and what StoreUrlRewrite does.
I am here for that..

if it works for you good for me and oyu.
why do you want to reduce browser cache??
it's not bad to have cache in the browser if you have enough ram.

<SNIP>

If you have a large browser cache, and you replay the video, you can't
tell for sure if the video came from the browser cache, or Squid
cache. Therefore one is liable to draw wrong conclusions as I did.
For what do you need that exactly?
if the browser prefers to not draw from cache in most cases the server will cache it automatically. youtube is cached but not by the browser but by the player unless you play with html5 player.

Eliezer






[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux