In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
The main content of this article is to explain "what is OSCache". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn what OSCache is.
OSCache is an open resource buffer library. It includes a set of JSP tags, through which you can easily implement page caching in your program, and you can also use its filter to cache not only JSP pages, but also any Servlet-generated content.
Let's start with some of its terms:
Buffer record: an object stored in a page buffer is called a buffer record. In a JSP program, it is usually a JSP page, part of a JSP page, or the output of Servlet.
Buffer key code: it is like a Hash Table. When storing buffered records in the page cache, you must provide a buffer key code to identify each entry. In a JSP program, you may need to combine several request parameters to form a buffer key, or use a page request URI as a buffer key.
Buffer period: is the time that a buffer records in the page buffer. For a JSP page that displays data that is updated frequently, you should set a short buffer period.
Buffer domain: is the scope in which buffers are stored. You can store buffered records in the application domain so that they can be shared by all users, or in the session domain based on previous users.
Install OSCache
Extract the downloaded package, put oscache.jar in the lib directory, and put oscache.properties and oscache.tld under WEB-INF/classes. Add tag library configuration to web.xml:
Oscache
/ WEB-INF/classes/oscache.tld
The oscache.properties file is its configuration, and if you want to store the cache file on your hard drive and use windows, you need to use it in the specified directory. For example, if your directory is c:cache, you should write c:cache.
OSCache JSP tag
It is easy to use these tags. What you need to do is to prevent tags in the part of the JSP page that needs to be cached. The example of the following JSP page shows how it is implemented:
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.