惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Darknet – Hacking Tools, Hacker News & Cyber Security
AI
AI
S
Security Affairs
S
Secure Thoughts
Attack and Defense Labs
Attack and Defense Labs
Application and Cybersecurity Blog
Application and Cybersecurity Blog
H
Heimdal Security Blog
Forbes - Security
Forbes - Security
Security Archives - TechRepublic
Security Archives - TechRepublic
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Spread Privacy
Spread Privacy
C
Cybersecurity and Infrastructure Security Agency CISA
Latest news
Latest news
T
Tor Project blog
I
Intezer
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Project Zero
Project Zero
V2EX - 技术
V2EX - 技术
V
Vulnerabilities – Threatpost
L
Lohrmann on Cybersecurity
C
CXSECURITY Database RSS Feed - CXSecurity.com
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Hacker News: Ask HN
Hacker News: Ask HN
S
Schneier on Security
T
Threat Research - Cisco Blogs
Webroot Blog
Webroot Blog
T
Threatpost
Help Net Security
Help Net Security
W
WeLiveSecurity
Know Your Adversary
Know Your Adversary
WordPress大学
WordPress大学
L
LINUX DO - 最新话题
月光博客
月光博客
PCI Perspectives
PCI Perspectives
小众软件
小众软件
爱范儿
爱范儿
博客园 - Franky
Security Latest
Security Latest
Microsoft Azure Blog
Microsoft Azure Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Stack Overflow Blog
Stack Overflow Blog
Google DeepMind News
Google DeepMind News
Scott Helme
Scott Helme
P
Privacy International News Feed
Y
Y Combinator Blog
P
Palo Alto Networks Blog
M
MIT News - Artificial intelligence
N
Netflix TechBlog - Medium

博客园 - 摆渡人 外婆桥!

此BLOG不再继续了,请访问http://www.blogjava.net/swingboat 在Oracle中,快速获取一个部门以及它下面所有的子部门的方法。 OsWorkFlow学习(FSM:有限状态机) OsWorkFlow学习(概念) OsWorkFlow学习(数据库设置) 知识 企业如何确定是否需要BPM(出自:计世网) jsp页面,以excel的方式输出 - 摆渡人 外婆桥! - 博客园 在jboss4环境下,URL查询参数中支持中文 - 摆渡人 外婆桥! - 博客园 使用Junit时源代码和测试代码的组织(摘自Daping_Zhang 的 Blog ) junit的使用 利用html中的div标签实现网页中某一块区域的自动滚动 struts及jstl使用问题集(一) 在struts框架下实现文件的上传 利用jspsmartupload上传文件,当我不选择文件就直接上传,会有什么结果呢?一个字“惨”啊! 软件工程中的经典案例! 利用edtftpj组件实现FTP文件的上传。 含有中文字符串的截取问题! 在struts1.1框架下,利用smartupload实现文件的上传(可以是多个文件)
cache模式的两种构成方式
摆渡人 外婆桥! · 2005-08-16 · via 博客园 - 摆渡人 外婆桥!

在我们系统开发中,有一些数据变动比较少,但是会经常对它进行访问。为了提高访问的性能,我们首先会把数据从数据库中读出,放入到一个Hashtable中。以后数据的访问都是从Hashtable中获取,这样起到了一个cache的作用。从数据库中获取数据有两种方式:
1、系统第一次访问,从数据中获取所有的数据放入到Hashtable。
      这种方式比较适合数据量比较小的数据,例如:模块的管理。一个系统中不可能有太多的模块,一次从数据库中获取出所有的模块数据,放入到Hashtable中。以后对模块的访问都只用对Hashtable访问就可以了。
 2、系统第一次访问,只获取需要访问的数据,然后把它们放入到Hashtable中
       这种方式比较适合数据量还是比较大的数据。需要访问数据时,首先检测Hashtable中有没有需要的数据,如果有就直接从Hashtable中获取,如果没有就从数据库中获取需要的数据,然后再把这些数据放入到Hashtable中。

注意:两种方式,当数据被改动的时候(add,update,del)同时也需要更新Hashtable中的数据。