From: http://www.cnblogs.com/hoojo/archive/2012/07/12/2587556.htmlEhcache has appeared in many projects, and the usage is relatively simple. The general configuration is available, and Ehcache can cache pages, objects, and data while supporting cluster/distributed Caching. Spring's support for Ehcache is also very good if it is easy to integrate spring and Hibernate. Ehcache supports memory and disk caching
The way Web programs get information is primarily querying the database, which is not a big problem when the database is not very large. However, with the development of the website, the database in a geometric pattern of growth, there will be bottlenecks. So the PHP cache technology was born. PHP cache includes both PHP compilation cache and PHP data cache.
PHP is an interpreted language, which belongs to the side-compilation side of the run. The advantage of this mode of operation is that pro
caching-Cache architecture and source code analysisFirst dedicated caching open source address [Microsoft Source]1. Engineering structureIn order to improve the efficiency of the program, we often change some infrequently, but use very large data to cache. In particular, Internet products, caching can be said to improve efficiency optimization of the first weapon
page and generate the cache page file at the same time, so the next visit to the page file will play a role. (the template engine and some common PHP caching mechanism classes on the web usually have this feature)
Time-Triggered cache:
Check that the file exists and that the timestamp is less than the expiration time of the setting, and if the timestamp of the file modification is greater than the current timestamp minus the expiration timestamp, the
Caching [cache]Setting up caching [cache creation]
require('Smarty.class.php');$smarty = new Smarty;$smarty->caching = 2; // lifetime is per cache// set the cache_lifetime for index.tpl to 5 minutes$smarty->cache_lifetime = 300;$smarty->display('index.tpl');// set the cache_lifetime for home.tpl to 1 hour$smarty->cache_lifetime = 3600;$smarty->display('home.tpl'
Ajax cache is good, but it also has some disadvantages. Caching sometimes leads to misoperations and affects user experience. If your WEB project does not require ajax caching, you can disable ajax caching in the following ways.1. Disable ajax caching in ASP:'At the beginning of ASP web page The code is as follows
in the Web development process, caching is a commonplace topic. This paper introduces the definition, function, classification and mechanism of the cache and its principle. Hope to be helpful to everyone, if there is a mistake, please also make corrections.What is Web cachingaccording to Interpretation on MDN, caching refers to the technique of storing a copy of a specified resource and providing the copy i
For static pages there are etag.
First, first look at the case: Apache static page
The static page that Apache sends to the client typically contains last-modified and etag, the values of which are from the modified time of the static file and the Inode.
The following is the intercept of Apache returned to the client's head
xml/html Code
Copy Code code as follows:
Last-modified:fri, 2007 01:53:34 GMT
ETag: "3f9f640-318-cb9f8380"
Search engines like static files beca
MyBatis contains a very powerful query caching feature that can be easily configured and customized. By default, the cache is not turned on, and to turn on level two caching, you need to add a line to your SQL map file:
This is literally the case. The effect of this simple statement is as follows:1. All SELECT statements in the mapping statement file will be cached.2. All insert,update and DEL
Offline caching is where the data received from the server is saved locally when the network is unblocked, and the data in the local file is read directly after the network is disconnected. such as the JSON data cache to the local, in the state of the network when the app started to read local cache data displayed in the interface, the common app (NetEase news, know, etc.) are supported offline caching, whi
The three themes of image caching, gestures, and oom are put together because these three issues are often linked in the Android application development process. First, preview large image needs to support gesture scaling, rotation, translation, and other operations; Secondly, the picture needs to be cached locally, avoid frequent access to the network; Finally, the image (Bitmap) is a large memory footprint of the Android, involving HD Big image proc
Recently after work has a lot of leisure time, want to do a content management system, including the foreground article browsing and backstage article management.
Today you will be thinking about the caching aspects of the system that will be used.
1, with what do cache.
In previous projects in contact with Redis and Memcache, when the project used Redis more, so compared to Mecache, they are more familiar with Redis, so this time using Redis to do
, or cache keys and valuesListen to the Continuousquerycache.Make continuousquerycache read-only23.1using continuous query cachingThere are several different types of continuous query caching general purpose categories:It is an ideal building block for complex event processing (CEP ) systems and event correlation engines. This is an ideal case where the application repeats a particular query and will benefit from always having instant access to the l
There are three ways to add data in jquery, $ (). attr (), $ (). Prop (), $ (). Data (). However, the previous two types are used to add attribute values to the element, only for a small amount of data, such as: Title,class,name, etc. The data method is the most important method of the jquery caching mechanism, which is suitable to be added in the case of JSON.Why do we use the caching mechanism system in j
by specific languages. It only requires support from Web servers or application servers. Ngnix, Apache, Tomcat, and Jboss all provide better support for this technology.
Disadvantage: SSI syntax cannot directly contain URLs of other servers (of course, it can also be implemented through redirect and other alternatives ), therefore, it is not flexible to make full use of the cache and Server Load balancer.
Of course, if you do not use a separate cache server, but use Ngnix to support SSI and Mem
third-party network request Library* We can use the nsurlrequest and nsurlconnection provided by the system when we request the network, it basically can realize our basic function.* But sometimes we use third-party encapsulated libraries, which makes it easy to implement features that are difficult to implement using system methods.* Common third-party libraries are: ASIHTTPRequest, afnetworking, Mknetworkkit.
asihttprequest:http://allseeing-i.com/asihttprequest/
Afnetworking:https
Objective
Smarty is an excellent PHP template engine that separates the logic code from the user interface.
Learning and using smarty, which is not applied to its cache technology is a big loss, it can be the user finally see the HMTL file cached into a static HTML page, when set Smarty the Cache property is true, In the Cachetime period set by Smarty, the user's Web request is converted directly into this static HTML file, which is equivalent to calling a static HTML file, which reduces a lot o
Yii enables fragment caching, and yii enables fragment caching. Yii enables fragment caching. yii enables fragment this article describes how Yii enables fragment caching. For your reference, refer to: 1. in the main. php file, comp Yii enables the fragment caching method, a
Fragment caching refers to caching a fragment of a webpage. For example, if a page shows an annual sales summary in a table, we can store this table in the cache, reducing the time that each request needs to be re-generated.
To use fragment caching, call Ccontroller::begincache () and Ccontroller::endcache () in the Controller view script. Both methods start and
Preface
Smarty is an excellent PHP template engine that separates the logic code from the user interface.
Learning and using smarty, which is not applied to its cache technology is a big loss, it can be the user finally see the HMTL file cached into a static HTML page, when set Smarty the Cache property is true, In the Cachetime period set by Smarty, the user's Web request is converted directly into this static HTML file, which is equivalent to calling a static HTML file, which reduces a lot
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.