Resource such as documents only available for one particular user or authorized user.CPUs have a number of caching levels. Can only be used by one user/client such as personal information on web site (for authorized user) Can be shared by many users such as site logo, navigation images, js, css, etc. When to use public cache, private cache, or not to cache It can even be appropriate for encrypted documents to be so cached (though this requires one to be very sure as to the security of the cache itself, and so is generally not done) anything which can only be seen by authorized users or which changes its representation depending upon who is looking at it). With some representations it may not be appropriate for public caches to cache them or to return those representations without re-validating them but perfectly acceptable for private caches to do so (e.g.As such you can rely upon the presence of at least one cache being involved in almost everything you do on the web. Almost every client on the visible web (that is, browsers, RSS readers, and other interactive user agents) and a very large number of those on the machine-only parts of the web (that is, spiders and clients of webservices) use a private cache of some sort.They offer immense benefits to the user of that one client.Private caches do not offer quite as much scalability as public caches, but they do have certain important advantages over public caches: Generally this applies only to a cache maintained by that client itself, though if you had a proxy that was only being used by one client (say you had a small LAN for your own use only and put a web proxy near the gateway) it would be possible to configure it to act as a private cache. Reverse Proxies (gateway caches) and the vast majority of proxies are public caches.Ī private cache is only used by one client. As such it gives a greater performance gain and a much greater scalability gain, as a user may receive cached copies of representations without ever having obtained a copy directly from the origin server. This example shows private cache GET|HEAD for logged-in userĪ public, or "shared" cache is used by more than one client.The TTL of cache is 300 seconds (5 minutes). # cache should be available for HEAD or GET requests Manually create the directory from shell, and give write permission for litespeed/lshttpd processes (assume running as "nobody" here):.tmp/diskcache (set it to a ramdisk such as /dev/shm/lsdiskcache if enough extra memory can be spared to speed up further) Cache Storage Settings->Storage Path: set to a fast local disk, e.g.Enable cache function at Server level in LSWS Here are the steps to enable LSWS built-in cache:ġ. maintain a private persistent cache for specific groups of documents that are not to be shared among other applications.maintain a persistent cache for applications that do not have a shared cache.Private cache is for caching resources for individual specifically instead of public shared. Since 4.1.1 (May, 2011), private cache support is added. Abuse use of this feature would result in performance degradation and/or other unexpectancies. It is worth noting that the cache function SHOULD ONLY be used for the pages that are supposed to be cached or cache friendly. Generating cookie usually requires application code modification. htaccess) to control its behavior for maximum flexibility.Ī general way to enable LiteSpeed Cache through rewrite rules is to designate a signature token (such as cookie) in a page (or any page) in most cases to tell LSWS that cache can be enabled and TTL(Time To Live) of the cache freshness however acceptable. The uniqueness of LiteSpeed cache is that it uses rewrite rules (either in configuration files or. Hence more efficient for static contents. Unlike Varnish, it is built into LiteSpeed web server, eliminating one layer of reverse proxy. It is an output cache for dynamic contents, so the usage does not limit to PHP pages. LiteSpeed cache has similar features as Apache mod_cache but implemented in a more efficient way, and works like Varnish. As of 4.1.1 (May, 2011), private cache support is added. LiteSpeed has made a built-in cache functionality (an advanced feature for Enterprise 2+CPU license) available since version 4.0 (March, 2009), and keeps improving throughout the later 4.0.x releases and 4.1RC releases.
0 Comments
Leave a Reply. |