JP2008293281A - Cache device, server, cache system, cache method, and program - Google Patents
Cache device, server, cache system, cache method, and program Download PDFInfo
- Publication number
- JP2008293281A JP2008293281A JP2007138233A JP2007138233A JP2008293281A JP 2008293281 A JP2008293281 A JP 2008293281A JP 2007138233 A JP2007138233 A JP 2007138233A JP 2007138233 A JP2007138233 A JP 2007138233A JP 2008293281 A JP2008293281 A JP 2008293281A
- Authority
- JP
- Japan
- Prior art keywords
- cache
- file
- type
- content
- correspondence table
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
- 238000000034 method Methods 0.000 title claims abstract description 13
- 238000012546 transfer Methods 0.000 claims description 6
- 230000005540 biological transmission Effects 0.000 claims description 5
- 230000000694 effects Effects 0.000 description 7
- 238000012217 deletion Methods 0.000 description 6
- 230000037430 deletion Effects 0.000 description 6
- 238000012545 processing Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 238000005315 distribution function Methods 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Description
本発明は、キャッシュ装置、サーバ、キャッシュシステム、キャッシュ方法、及びプログラムに関し、特に、ファイルを、ファイルの種類に応じて異なるキャッシングアルゴリズムで保存するキャッシュ装置、サーバ、キャッシュシステム、キャッシュ方法、及びプログラムに関する。 The present invention relates to a cache device, a server, a cache system, a cache method, and a program, and more particularly, to a cache device, a server, a cache system, a cache method, and a program for storing a file with a different caching algorithm depending on the type of the file. .
キャッシュコンピュータを備えたファイルの送受信システムの一例が、特許文献1に記載されている。このファイルの送受信システムにおけるキャッシュコンピュータは、キャッシュファイルの種類を判断する。そして、キャッシュコンピュータは、キャッシュファイルの種類ごとに定められた削除の順序にもとづいて、キャッシュファイルの中から所定個数のキャッシュファイルを選択し、削除する。
An example of a file transmission / reception system including a cache computer is described in
上述したファイル送受信システムにおけるキャッシュコンピュータは、キャッシュファイルの種類に応じた処理を行っている。しかしながら、要求されるファイルのサイズ等の特性にばらつきがある状況では、キャッシュ効率が低下しやすいという問題点があった。その理由は、上述したキャッシュコンピュータは、キャッシュファイルの種類ごとに削除の順序を定めている特定のアルゴリズムを使用しているが、キャッシュファイルの種類ごとに異なるアルゴリズムを使用していないためである。 The cache computer in the file transmission / reception system described above performs processing according to the type of cache file. However, there is a problem in that cache efficiency tends to be reduced in a situation where characteristics such as a required file size vary. The reason is that the cache computer described above uses a specific algorithm that determines the deletion order for each type of cache file, but does not use a different algorithm for each type of cache file.
例えば、特許文献1に記載のファイル送受信システムでは、文書ファイルの削除の順序を画像ファイルの削除の順序より先にするアルゴリズムを使用する。しかしながら、文書ファイルに対するキャッシングアルゴリズムと、画像ファイルに対するキャッシングアルゴリズムとをそれぞれ別々に持っているわけではない。
For example, the file transmission / reception system described in
ここで、例えば、キャッシュ上のファイル削除順序(ファイル置換順序)を決定するための計算量が多いアルゴリズムが、文書ファイルと画像ファイルの両方に対して使用されているとする。この場合、文書ファイルのようなサイズの小さいファイルが頻繁に要求されるようなときでも、そのアルゴリズムが適用されることになる。その結果、キャッシュ上のファイル削除順序を決定するための計算に時間がかかり、文書ファイルのダウンロード時間よりもキャッシュにおけるアルゴリズム処理時間の方が大きくなることが起こりうる。 Here, for example, it is assumed that an algorithm having a large amount of calculation for determining the file deletion order (file replacement order) on the cache is used for both the document file and the image file. In this case, the algorithm is applied even when a small file such as a document file is frequently requested. As a result, the calculation for determining the file deletion order on the cache takes time, and the algorithm processing time in the cache may be longer than the download time of the document file.
本発明の目的は、上述した関連技術の課題であるキャッシュ効率が低下しやすいことを解決するキャッシュ装置、サーバ、キャッシュシステム、キャッシュ方法、及びプログラムを提供することにある。 An object of the present invention is to provide a cache device, a server, a cache system, a cache method, and a program that solve the problem that the cache efficiency, which is a problem of the related art described above, is likely to decrease.
本発明のキャッシュ装置は、ファイルを、前記ファイルの種類に応じて異なるキャッシングアルゴリズムで保存することを特徴とする。 The cache device according to the present invention stores a file with a different caching algorithm depending on the type of the file.
本発明のサーバは、ファイルを、前記ファイルの種類に応じて異なるキャッシングアルゴリズムで保存することを特徴とする。 The server of the present invention stores a file with a different caching algorithm depending on the type of the file.
本発明のキャッシュシステムは、ファイルを保存するWebサーバと、前記Webサーバ上の前記ファイルを要求するクライアントと、前記クライアントが接続され、前記クライアントの代理としてWebサーバとの接続を行なうプロキシサーバを備えたキャッシュ装置と、前記Webサーバと前記プロキシサーバとが接続されたネットワークとを備え、前記キャッシュ装置は、前記ファイルを、前記ファイルの種類に応じて異なるキャッシングアルゴリズムで保存することを特徴とする。 A cache system according to the present invention includes a Web server that stores a file, a client that requests the file on the Web server, and a proxy server that is connected to the client and connects to the Web server as a proxy for the client. And a network to which the Web server and the proxy server are connected, and the cache device stores the file with a different caching algorithm depending on the type of the file.
本発明のキャッシュ方法は、ファイルを、前記ファイルの種類に応じて異なるキャッシングアルゴリズムで保存することを特徴とする。 The cache method of the present invention is characterized in that a file is stored with a different caching algorithm depending on the type of the file.
本発明のプログラムは、コンピュータに、ファイルを、前記ファイルの種類に応じて異なるキャッシングアルゴリズムで保存することを実行させることを特徴とする。 The program according to the present invention causes a computer to store a file with a different caching algorithm depending on the type of the file.
本発明は、キャッシュ効率を向上させることができるという効果を有している。その理由は、ファイルを、ファイルの種類に応じて異なるキャッシングアルゴリズムで保存するためである。 The present invention has an effect that cache efficiency can be improved. The reason is that the file is stored with a different caching algorithm depending on the file type.
次に、本発明の第1の実施例について図面を参照して詳細に説明する。 Next, a first embodiment of the present invention will be described in detail with reference to the drawings.
図1は、本発明の第1の実施例におけるキャッシュシステム1001の構成を示す図である。キャッシュシステム1001は、クライアント100、クライアント110、クライアント120、キャッシュ装置200、及びインターネット400を備える。また、キャッシュシステム1001は、World Wide Webサーバ500(以下、Webサーバ500と称す)、画像(静止画、又は動画)ファイル510、文書ファイル520を備える。クライアント100〜120、キャッシュ装置200、Webサーバ500は、プロセッサを備えた情報処理装置であり、プログラム記憶媒体に記憶されたプログラムを実行することにより後述の機能を実現する。クライアント100〜120の数は例として3つであるが、それより多くても少なくてもよい。以後クライアント100をクライアント100〜120の代表として説明する。
FIG. 1 is a diagram showing a configuration of a cache system 1001 in the first embodiment of the present invention. The cache system 1001 includes a
クライアント100は、Webサーバ500上の画像ファイル510、文書ファイル520等のファイルを後述のプロキシサーバ210、インターネット400を介して要求する端末である。
The
インターネット400は、プロキシサーバ210を含むキャッシュ装置200とWebサーバ500とが接続されたネットワークである。
The Internet 400 is a network in which the
Webサーバ500は、画像ファイル510、文書ファイル520等のファイルを保存、管理するサーバである。Webサーバ500は、インターネット400を介してこれらファイルの提供を行う。
The
キャッシュ装置200は、クライアント100〜120、インターネット400に接続された装置である。キャッシュ装置200は、プロキシサーバ210、複数のキャッシュ(本実施例では、キャッシュディスク300〜320を例として示す。キャッシュディスク300〜320はハードディスクに限らず、半導体メモリからなるキャッシュを使用してもよい。)を備える。キャッシュディスク300〜320の数は例として3つであるが、それより多くても少なくてもよい。
The
プロキシサーバ210には、クライアント100〜120、キャッシュディスク300〜320が接続されている。プロキシサーバ210は、クライアント100〜120を代理してインターネット400を介してWebサーバ500に対する接続を行なう。プロキシサーバ210は、キャッシュディスク300〜320が、クライアント100が要求するファイルを保存している場合、そのファイルをクライアント100に送信する。キャッシュディスク300〜320がそのファイルを保存していなかった場合、Webサーバ500からファイルを受信し、クライアント100に転送する。
To the
プロキシサーバ210は、ファイル種別判別部211、キャッシュディスク振分け部212を備える。
The
ファイル種別判別部211は、ファイルの拡張子に対応するHyperText Transfer Protocol(以下、HTTPプロトコルと称す)のContent-Typeを決定する。ファイル種別判別部211は、拡張子-Content-Type対応表2111を備える。図2は、拡張子-Content-Type対応表2111の一例を示す図である。初期状態ですでに一般的な対応が登録されているものとする。
The file
キャッシュディスク振分け部212は、Content-Type-キャッシュディスク番号対応表2121、キャッシュディスク番号-Expiresフィールド対応表2122を備える。
The cache
キャッシュディスク振分け部212は、Content-Type-キャッシュディスク番号対応表2121を参照し、クライアント100から要求されたファイルのContent-Typeに対応するキャッシュディスク番号のキャッシュディスクを決定する。例えば、キャッシュディスク300(キャッシュディスク番号1のキャッシュディスク)が、クライアント100から要求されたファイルのContent-Typeに対応するものであったとする。キャッシュディスク振分け部212は、キャッシュディスク番号-Expiresフィールド対応表2122を参照して、キャッシュディスク300がファイルに設定された有効期限を利用する設定であるかどうかを判断する。
The cache
図3はContent-Type-キャッシュディスク番号対応表2121であり、図4はキャッシュディスク番号-Expiresフィールド対応表2122である。本実施例では、キャッシュディスク番号1,2,3は、それぞれキャッシュディスク300,310,320に対応するものとする。キャッシュディスク番号-Expiresフィールド対応表2122は、それぞれのキャッシュディスク300〜320に対応して、それぞれのキャッシュディスク300〜320(のキャッシュディスク番号)が有効期限を利用する設定であるかどうかを示すフラグ(Expiresフィールドを使うか? Yes/No)を保存している。
FIG. 3 shows a Content-Type-cache disk number correspondence table 2121, and FIG. 4 shows a cache disk number-Expires field correspondence table 2122. In this embodiment, the
また、キャッシュディスク番号-Expiresフィールド対応表2122は、それぞれのキャッシュディスク300〜320が使用するアルゴリズムの番号を保存している。拡張子-Content-Type対応表2111、Content-Type-キャッシュディスク番号対応表2121、及びキャッシュディスク番号-Expiresフィールド対応表2122はプロキシサーバ管理者が設定可能である。
Also, the cache disk number-Expires field correspondence table 2122 stores the algorithm numbers used by the
キャッシュディスク300〜320は、キャッシュディスク番号-Expiresフィールド対応表2122に従い、それぞれ異なるキャッシングアルゴリズム(キャッシュの置換アルゴリズム)でファイルを保存する。例えば、キャッシュディスク300とキャッシュディスク310は、LRU(Least Recently Used)アルゴリズムでファイルを保存し、キャッシュディスク320は、Landlord Algorithmでファイルを保存する。また、キャッシュディスク300〜320は、保存するそれぞれのファイルのファイル名と、それぞれのファイルのExpiresパラメータ、価値パラメータ(前述のLRU、Landlord Algorithm等における価値パラメータ)、Expiresパラメータ、格納領域を示すアドレス、Webサーバ500のURLと、の対応表を備える(図示せず)。
The
次に、本発明の第1の実施例の動作について、図5及び図6のフローチャートを参照して詳細に説明する。 Next, the operation of the first embodiment of the present invention will be described in detail with reference to the flowcharts of FIGS.
図5は、クライアント100からWebサーバ500にあるファイルの取得要求を受けたときのキャッシュ装置200の動作を示したフローチャートである。
FIG. 5 is a flowchart showing the operation of the
まず、図5のフローチャートを参照すると、クライアント100がWebサーバ500にある画像ファイル510又は、文書ファイル520を要求する(ステップ100)。ここでは例として、クライアント100は、文書ファイル520を要求したものとする。クライアント100からの要求には文書ファイル520が存在するUniform Resource Locator(URL)が含まれている。プロキシサーバ210はこのURLのファイル名に付された拡張子を参照し、文書ファイル520の拡張子を判別する(ステップ101)。そして、プロキシサーバ210は、ファイル種別判別部211が持つ拡張子-Content-Type対応表2111を参照し、当該文書ファイル520の拡張子が拡張子-Content-Type対応表2111に登録されているか判断する(ステップ102)。
First, referring to the flowchart of FIG. 5, the
当該文書ファイル520の拡張子が拡張子-Content-Type対応表2111に登録されている場合(ステップ102、Yes)、当該文書ファイル520に対応するHTTPプロトコルにおけるContent-Typeを決定する(ステップ103)。
When the extension of the
キャッシュディスク振分け部212は、Content-Type-キャッシュディスク番号対応表2121を備えている。プロキシサーバ210は、Content-Type-キャッシュディスク番号対応表2121を参照し、Content-Typeを元に当該Content-Typeに対応するキャッシュディスクを決定する(ステップ104)。ここではキャッシュディスク310が当該Content-Typeに対応するキャッシュディスクであったとする。プロキシサーバ210は、キャッシュディスク310において文書ファイル520を検索する(ステップ105)。即ち、キャッシュディスク310が備える対応表において、プロキシサーバ210は、文書ファイル520のファイル名とWebサーバ500のURLをキーに検索を行う。プロキシサーバ210は、同じファイル名が複数存在した場合に備え、Webサーバ500のURLについても平行して検索を行い、検索結果の積を取る。
The cache
文書ファイル520がキャッシュディスク310に存在したとする(ステップ106、Yes)。キャッシュディスク振分け部212は、キャッシュディスク番号-Expiresフィールド対応表2122を参照してキャッシュディスク310がExpiresフィールドを利用する設定であるか調べる(ステップ107)。キャッシュディスク310がExpiresフィールドを利用する設定であったとする(ステップ107、Yes)。すると、キャッシュディスク振分け部212は、当該文書ファイル520のExpiresパラメータを取得する。即ち、キャッシュディスク振分け部212からExpiresパラメータ取得要求を受けたキャッシュディスク310は、キャッシュディスク310が保存する各々のファイルのファイル名と各々のファイルのExpiresパラメータとの対応表を参照する。そして、キャッシュディスク310は、当該文書ファイル520に対応するExpiresパラメータをキャッシュディスク振分け部212に転送する(ステップ108)。
Assume that the
現在の時刻が文書ファイル520のExpiresパラメータの値を超えていた場合(ステップ109、Yes)、キャッシュディスク振分け部212は、キャッシュディスク310中の文書ファイル520を削除し(ステップ112)、ステップA(図6のステップ200)へ進む。また、文書ファイル520の拡張子が拡張子-Content-Type対応表2111に登録されていない場合も(ステップ102、No)、ステップA(図6のステップ200)へ進む。文書ファイル520がキャッシュディスク300〜320に存在しなかった場合も(ステップ106、No)、ステップA(図6のステップ200)へ進む。
When the current time exceeds the value of the Expires parameter of the document file 520 (
キャッシュディスク300がExpiresフィールドを利用する設定では無い場合(ステップ107、No)、もしくは 現在の時刻が文書ファイル520のExpiresパラメータの値を超えていなかった場合であったとする(ステップ109、No)。キャッシュディスク310は、キャッシュディスク310に対して設定されたアルゴリズムを用いて、キャッシュディスク310中の文書ファイル520のキャッシュディスク310内の価値パラメータを増大させる(ステップ110)。例えば、キャッシュディスク310は、LRUアルゴリズムにおいて、当該文書ファイル520を最も最近使われたファイルとして、キャッシュディスク310が備える対応表の価値パラメータの欄に設定する。プロキシサーバ210は、キャッシュディスク310から当該文書ファイル520をクライアント100に転送する(ステップ111)。
Assume that the
図6は、図5のフローチャートにおいて、キャッシュディスク310にクライアント100が要求する文書ファイル520がなく、元の文書ファイル520をWebサーバ500からダウンロードする場合における、キャッシュ装置200の動作を示したフローチャートである。若しくは、図6は、現在の時刻が文書ファイル520のExpiresパラメータの値を超えていた場合におけるキャッシュ装置200の動作を示したフローチャートである。
FIG. 6 is a flowchart showing the operation of the
プロキシサーバ210は、Webサーバ500へアクセスを行う(ステップ200)。プロキシサーバ210は、文書ファイル520を実際に取得する要求を行う前に、文書ファイル520のhttpヘッダ情報だけを取得する要求をWebサーバ500に対し行う。そして、プロキシサーバ210は、Webサーバ500からクライアント100が要求する文書ファイル520のhttpヘッダを取得する(ステップ201)。プロキシサーバ210は、ステップ200で取得したhttpヘッダより当該文書ファイル520のContent-Typeを取得する(ステップ202)。
The
ステップ201で得た文書ファイル520のContent-Typeと文書ファイル520の拡張子の対応が、ファイル種類判別部211の持っている拡張子-Content-Type対応表2111に存在しなかったとする(ステップ203、No)。ファイル種類判別部211は、新しい対応として拡張子-Content-Type対応表2111に登録を行う(ステップ204)。
It is assumed that the correspondence between the Content-Type of the
ステップ201で得た文書ファイル520のContent-Typeと文書ファイル520の拡張子の対応が、ファイル種類判別部211の持っている拡張子-Content-Type対応表2111に存在したとする(ステップ203、Yes)。又は、新しい対応として拡張子-Content-Type対応表2111に登録を行ったとする(ステップ204)。この両方の場合、キャッシュディスク振分け部212は、ステップ202で得たContent-Typeより、Content-Typeに対応するキャッシュディスク番号のキャッシュディスク310を決定する(ステップ205)。ここでは例として、キャッシュディスク310が該当するものとする。
Assume that the correspondence between the Content-Type of the
そして、プロキシサーバ210はWebサーバ500より実際に文書ファイル520を取得する(ステップ206)。プロキシサーバ210はクライアント100に文書ファイル520を転送する(ステップ207)。プロキシサーバ210は文書ファイル520をキャッシュディスク310に転送し、キャッシュディスク310に設定されているアルゴリズムを元に文書ファイル520の価値パラメータを設定する(ステップ208)。例えば、LRUアルゴリズムにおいては、文書ファイル520が、最も最近使われたファイルとしてキャッシュディスク310に設定される。キャッシュディスク300がExpiresフィールドを利用する設定であったとする(ステップ209、Yes)。プロキシサーバ210はキャッシュディスク300中のExpiresパラメータに、ステップ200で取得した文書ファイル520のhttpヘッダのExpiresフィールドの値(Expiresパラメータ)を設定する(ステップ210)。以上で本発明の第1の実施例に係る動作が終了する。
Then, the
上述の本発明の第1の実施例では、プロキシサーバ210がファイル種別判別部211とキャッシュディスク振分け部212とを備えたが、ファイル種別判別とキャッシュディスク振分けの機能だけ別のサーバに移した構成としてもよい。図7は、キャッシュシステム1001の構成の変形例である。図1と比較し、プロキシサーバ210がプロキシサーバ210とキャッシュサーバ220に分かれていることが異なる点である。
In the first embodiment of the present invention described above, the
動作の相違点としては、図5に示したフローチャートにおいては、ステップ101とステップ102との間に、プロキシサーバ210からキャッシュサーバ220へ要求された文書ファイル520の情報を転送するステップが入る。図6に示したフローチャートにおいては、ステップ206が変更となり、キャッシュサーバ220がプロキシサーバ210を介して、Webサーバ500から文書ファイル520を取得することになる。
As a difference in operation, in the flowchart shown in FIG. 5, a step of transferring the requested
第1の実施例における発明は、例えば、キャッシュ効率を向上させることができるという効果を有している。その理由は、ファイルを、ファイルの種類に応じて異なるキャッシングアルゴリズムで保存するためである。インターネット400に存在するファイルには画像、動画、文書等種類があり、種類に応じてファイルサイズ、ダウンロード時間、要求される頻度、更新頻度など、その特性に差が認められる。本発明は、ファイルの種類を判別し、ファイルの種類に応じて異なるキャッシングアルゴリズムで保存する。この結果、例えば、キャッシュの効果が増大することにより、平均ダウンロード待ち時間が減少するという効果を有する。また、例えば、キャッシュの効果が増大することにより、通信料が減少するという効果を有する。 The invention in the first embodiment has an effect that, for example, the cache efficiency can be improved. The reason is that the file is stored with a different caching algorithm depending on the file type. There are various types of files such as images, moving images, and documents in the Internet 400, and differences in characteristics such as file size, download time, required frequency, and update frequency are recognized depending on the type. The present invention discriminates the file type and saves it with a different caching algorithm depending on the file type. As a result, for example, there is an effect that the average download waiting time is reduced by increasing the cache effect. In addition, for example, an increase in the cash effect has the effect of reducing communication charges.
また、キャッシュディスク300〜320がファイルに設定された有効期限を利用するか否かを設定(例えば、httpヘッダに含まれるExpiresフィールドの値を利用するか否かを設定)できることも、キャッシュ効率を向上させることができる理由の一つである。
In addition, it is possible to set whether or not the
例えば、文書ファイルは一般に頻繁に更新されるため、キャッシュは、httpヘッダに含まれるExpiresフィールドの値を超過した新鮮で無い文書ファイルを破棄する必要がある。しかし、動画ファイルや音声ファイルは一般にアップロードされた後は不変のため、Expiresフィールドの値は重要ではないことも多くある。動画ファイルや音声ファイルにおいてExpiresフィールドの値を利用しないことによって、有効期限が切れてはいるが実際には破棄する必要の無いファイルをキャッシュに残すことが可能となり、キャッシュ効率を向上させることができる。 For example, since document files are generally updated frequently, the cache needs to discard document files that are not fresh that exceed the value of the Expires field included in the http header. However, the value of the Expires field is often unimportant because video and audio files generally do not change after being uploaded. By not using the Expires field value for video and audio files, files that have expired but do not actually need to be discarded can be left in the cache, improving cache efficiency. .
次に、本発明の第2の実施例について図面を参照して説明する。本発明の第2の実施例では、ファイル種類判別にContent-Typeではなく拡張子のみを用いる。 Next, a second embodiment of the present invention will be described with reference to the drawings. In the second embodiment of the present invention, only the extension is used for determining the file type, not the Content-Type.
まず、本発明の第2の実施例における構成を説明する。図8は、本発明の第2の実施例におけるキャッシュシステム1001の構成を示す図である。図1に示された本発明の第1の実施例におけるキャッシュシステム1001と比較して、ファイル種別判別部211が存在しない点が異なる。また、キャッシュディスク振分け部212内のContent-Type-キャッシュディスク番号対応表2121の代わりに、拡張子-キャッシュディスク番号対応表2123を備える点が異なる。
First, the configuration of the second embodiment of the present invention will be described. FIG. 8 is a diagram showing the configuration of the cache system 1001 in the second embodiment of the present invention. Compared with the cache system 1001 in the first embodiment of the present invention shown in FIG. 1, the difference is that the file
次に、本発明の第2の実施例における動作を説明する。第1の実施例における動作を示したフローチャートである図5、図6からの変更点を説明する。 Next, the operation in the second embodiment of the present invention will be described. Changes from FIG. 5 and FIG. 6, which are flowcharts showing operations in the first embodiment, will be described.
図5に示したフローチャートにおいては、ステップ102、103、104の処理が変更となり、ファイルの拡張子に対応するキャッシュディスク番号のキャッシュディスク300〜320を決定する処理を行う。図6に示したフローチャートにおいては、ステップ202、203、204の処理が不要となる。また、ステップ205の処理が変更となり、ファイルの拡張子に対応するキャッシュディスク番号のキャッシュディスク300〜320を決定することになる。
In the flowchart shown in FIG. 5, the processing of
第2の実施例における発明は、ファイルのキャッシュディスク300〜320への振分け等において高速化を図ることができる、という効果を有する。その理由は、例えば、拡張子とContent-Typeの対応関係を調べないためである。そして、要求されたファイル名の拡張子を見て、拡張子から直接、捜索すべきキャッシュディスク300〜320、またはキャッシュするキャッシュディスク300〜320を決定することができるためである。
The invention according to the second embodiment has an effect that it is possible to increase the speed in distributing the files to the
本発明は、例えば、企業や学校等のローカルネットワークとインターネットの中間のプロキシサーバといった用途に適用できる。また、本発明は、例えば、インターネットサービスプロバイダにおいてユーザに代わってインターネットに接続するプロキシサーバといった用途にも適用可能である。 The present invention can be applied to, for example, a proxy server between a local network of a company or a school and the Internet. The present invention can also be applied to applications such as proxy servers that connect to the Internet on behalf of users at Internet service providers.
100 クライアント
110 クライアント
120 クライアント
1001 キャッシュシステム
200 キャッシュ装置
210 プロキシサーバ
211 ファイル種別判別部
2111 拡張子-Content-Type対応表
212 キャッシュディスク振分け部
2121 Content-Type-キャッシュディスク番号対応表
2122 キャッシュディスク番号-Expiresフィールド対応表
2123 拡張子-キャッシュディスク番号対応表
300 キャッシュディスク
310 キャッシュディスク
320 キャッシュディスク
400 インターネット
500 Webサーバ
510 画像ファイル
520 文書ファイル
DESCRIPTION OF
Claims (21)
を備えることを特徴とする請求項1に記載のキャッシュ装置。 The cache apparatus according to claim 1, further comprising: a cache distribution unit that determines a cache for searching or storing the file according to a type of the file.
を備えることを特徴とする請求項2に記載のキャッシュ装置。 The cache device according to claim 2, further comprising: a plurality of caches that store the files with different caching algorithms according to types of the files.
前記ファイルの種類と前記キャッシュとの対応表
を含むことを特徴とする請求項3に記載のキャッシュ装置。 The file distribution unit
The cache apparatus according to claim 3, further comprising: a correspondence table between the file type and the cache.
前記Webサーバ上の前記ファイルを要求するクライアントと、
前記クライアントが接続され、前記クライアントの代理としてWebサーバとの接続を行なうプロキシサーバと、
前記Webサーバと前記プロキシサーバとが接続されたネットワークと
を備えたキャッシュシステムにおいて、
前記キャッシュ装置は、前記プロキシサーバを含むこと
を特徴とする請求項4に記載のキャッシュ装置。 A web server for storing the file;
A client requesting the file on the web server;
A proxy server to which the client is connected and connects to a Web server as a proxy for the client;
In a cache system comprising a network to which the Web server and the proxy server are connected,
The cache device according to claim 4, wherein the cache device includes the proxy server.
前記キャッシュが前記ファイルを保存している場合、前記ファイルを前記クライアントに送信し、
前記キャッシュが前記ファイルを保存していなかった場合、前記Webサーバから前記ファイルを受信し、前記クライアントに転送すること
を特徴とする請求項5に記載のキャッシュ装置。 The proxy server is
If the cache stores the file, send the file to the client;
The cache device according to claim 5, wherein when the cache does not store the file, the file is received from the Web server and transferred to the client.
前記プロキシサーバは、
前記ファイルの拡張子に対応するHTTPプロトコルのContent-Typeを決定するファイル種類判別部と、
を備えることを特徴とする請求項6に記載のキャッシュ装置。 Transmission of the file from the Web server to the proxy server is performed by HTTP protocol,
The proxy server is
A file type determination unit for determining the HTTP protocol Content-Type corresponding to the extension of the file;
The cache device according to claim 6, further comprising:
拡張子とContent-Typeの対応表
を含むことを特徴とする請求項7に記載のキャッシュ装置。 The file type determination unit
The cache device according to claim 7, further comprising a correspondence table between extensions and Content-Type.
Content-Typeとキャッシュ番号の対応表を含み、
前記キャッシュ振分け部は、
前記ファイルのContent-Typeに対応するキャッシュ番号のキャッシュを決定し、
前記キャッシュに前記ファイルが存在するか検索すること
を特徴とする請求項8に記載のキャッシュ装置。 The correspondence table between the file type and the cache is as follows:
Including correspondence table of Content-Type and cache number,
The cash distribution unit
Determine the cache of the cache number corresponding to the Content-Type of the file,
The cache device according to claim 8, wherein the cache is searched for the existence of the file.
を特徴と請求項2乃至9のいずれかに記載のキャッシュ装置。 The cache device according to any one of claims 2 to 9, wherein the cache distribution unit determines whether the cache is set to use an expiration date set in the file.
前記キャッシュと当該キャッシュが有効期限を利用する設定であるかを示すフラグとの対応表
を含むことを特徴とする請求項10に記載のキャッシュ装置。 The cash distribution unit
The cache device according to claim 10, further comprising: a correspondence table between the cache and a flag indicating whether the cache is set to use an expiration date.
を特徴とする請求項11に記載のキャッシュ装置。 The flag indicating whether or not the cache is set to use an expiration date is a flag indicating whether or not the cache is set to use the value of the Expires field in the HTTP protocol of the file received from the Web server. The cache device according to claim 11, characterized in that:
を特徴とするサーバ。 A server that stores a file with a different caching algorithm depending on the type of the file.
前記Webサーバ上の前記ファイルを要求するクライアントと、
前記クライアントが接続され、前記クライアントの代理としてWebサーバとの接続を行なうプロキシサーバを備えたキャッシュ装置と、
前記Webサーバと前記プロキシサーバとが接続されたネットワークと
を備え、
前記キャッシュ装置は、
前記ファイルを、前記ファイルの種類に応じて異なるキャッシングアルゴリズムで保存すること
を特徴とするキャッシュシステム。 A web server for storing the file;
A client requesting the file on the web server;
A cache device comprising a proxy server to which the client is connected and which connects to a Web server as a proxy for the client;
A network to which the web server and the proxy server are connected;
The cache device is:
A cache system, wherein the file is stored with a different caching algorithm depending on the type of the file.
を特徴とするキャッシュ方法。 A caching method, wherein a file is stored with a different caching algorithm depending on the type of the file.
を特徴とする請求項15に記載のキャッシュ方法。 The cache method according to claim 15, wherein the cache for searching or storing the file is determined according to the type of the file.
前記ファイルが存在するURL(Uniform Resource Locator)のファイル名に付された拡張子から前記ファイルの拡張子を判別し、
前記ファイルの拡張子が拡張子-Content-Type対応表に登録されているか判断し、
前記ファイルの拡張子が拡張子-Content-Type対応表に登録されている場合、前記ファイルの拡張子に対応するHTTPプロトコルのContent-Typeを決定し、
前記Content-Typeに対応するキャッシュ番号のキャッシュを決定し、
前記キャッシュに前記ファイルが存在するか検索すること
を特徴とする請求項16に記載のキャッシュ装置。 A client requests the file on the web server;
Determine the extension of the file from the extension attached to the file name of the URL (Uniform Resource Locator) where the file exists,
Determine whether the extension of the file is registered in the extension-Content-Type correspondence table,
If the extension of the file is registered in the extension-Content-Type correspondence table, determine the HTTP protocol Content-Type corresponding to the extension of the file,
Determine the cache of the cache number corresponding to the Content-Type,
The cache device according to claim 16, wherein the file is searched for whether the file exists in the cache.
を特徴と請求項17に記載のキャッシュ方法。 The cache method according to claim 17, wherein it is determined whether the cache is set to use an expiration date set in the file.
前記キャッシュがExpiresフィールドの値を利用する設定である場合は、前記ファイルのExpiresパラメータを取得し、現在の時刻が前記ファイルのExpiresパラメータの値を超えているか判断し、
前記キャッシュがExpiresフィールドの値を利用する設定ではない場合、又は、現在の時刻が前記ファイルのExpiresパラメータの値を超えていない場合、
前記キャッシュに設定されたアルゴリズムに従い、前記キャッシュ中の前記ファイルの前記キャッシュ内の価値パラメータを増大させ、
前記ファイルを前記キャッシュから前記クライアントに転送すること
を特徴とする請求項18に記載のキャッシュ方法。 If the file exists in the determined cache, determine whether the cache is configured to use the value of the Expires field;
If the cache is set to use the value of the Expires field, obtain the Expires parameter of the file, determine whether the current time exceeds the value of the Expires parameter of the file,
If the cache is not configured to use the value of the Expires field, or if the current time does not exceed the value of the Expires parameter of the file,
Increase the value parameter in the cache of the file in the cache according to an algorithm set in the cache;
The cache method according to claim 18, wherein the file is transferred from the cache to the client.
前記Webサーバへアクセスを行い、
前記Webサーバ上の前記ファイルのhttpヘッダを取得し、
前記httpヘッダよりContent-Typeを取得し、
前記Content-Typeが拡張子とContent-Typeの対応表に登録されているか判断し、
前記Content-Typeが拡張子とContent-Typeの対応表に登録されている場合は、前記Content-Typeとキャッシュ番号の対応表から前記ファイルのContent-Typeに対応するキャッシュ番号のキャッシュを決定し、
前記Content-Typeが前記拡張子とContent-Typeの対応表に登録されていない場合は、前記拡張子とContent-Typeの対応表に前記Content-Typeを登録した後、前記Content-Typeとキャッシュ番号の対応表から前記ファイルのContent-Typeに対応するキャッシュ番号のキャッシュを決定し、
前記Webサーバから、前記ファイルを取得し、
前記ファイルを前記クライアントに転送し、
前記ファイルを決定された前記キャッシュに転送し、
前記キャッシュに設定されたアルゴリズムに従い、前記ファイルの前記キャッシュ内の価値パラメータを設定し、
前記キャッシュがExpiresフィールドの値を利用する設定である場合、前記キャッシュ中のExpiresパラメータに前記httpヘッダのExpiresフィールドの値を設定する
ことを特徴とする請求項19に記載のキャッシュ方法。 If the extension of the file is not registered in the extension-Content-Type correspondence table, if the file does not exist in the determined cache, or if the file exists in the determined cache, When the cache is configured to use the value of the Expires field, and the current time exceeds the value of the Expires parameter of the file, and the file in the cache is deleted,
Access the web server,
Get the http header of the file on the web server,
Get Content-Type from the http header,
Determine whether the Content-Type is registered in the extension and Content-Type correspondence table,
When the Content-Type is registered in the correspondence table between the extension and Content-Type, the cache of the cache number corresponding to the Content-Type of the file is determined from the correspondence table of the Content-Type and the cache number,
If the Content-Type is not registered in the extension-Content-Type correspondence table, the Content-Type and the cache number are registered after the Content-Type is registered in the extension-Content-Type correspondence table. Determine the cache of the cache number corresponding to the Content-Type of the file from the correspondence table of
Obtaining the file from the web server;
Transfer the file to the client;
Transferring the file to the determined cache;
Set the value parameter in the cache of the file according to the algorithm set in the cache;
The cache method according to claim 19, wherein when the cache is configured to use an Expires field value, the Expires field value of the http header is set in an Expires parameter in the cache.
ファイルを、前記ファイルの種類に応じて異なるキャッシングアルゴリズムで保存すること
を実行させるためのプログラム。 On the computer,
A program for causing a file to be stored with a different caching algorithm depending on the type of the file.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2007138233A JP2008293281A (en) | 2007-05-24 | 2007-05-24 | Cache device, server, cache system, cache method, and program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2007138233A JP2008293281A (en) | 2007-05-24 | 2007-05-24 | Cache device, server, cache system, cache method, and program |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2008293281A true JP2008293281A (en) | 2008-12-04 |
Family
ID=40167937
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2007138233A Withdrawn JP2008293281A (en) | 2007-05-24 | 2007-05-24 | Cache device, server, cache system, cache method, and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2008293281A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2010205237A (en) * | 2009-02-27 | 2010-09-16 | Yahoo Japan Corp | Data distribution device for setting browser holding period longer than cache holding period, and cache server and method |
-
2007
- 2007-05-24 JP JP2007138233A patent/JP2008293281A/en not_active Withdrawn
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2010205237A (en) * | 2009-02-27 | 2010-09-16 | Yahoo Japan Corp | Data distribution device for setting browser holding period longer than cache holding period, and cache server and method |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10798203B2 (en) | Method and apparatus for reducing network resource transmission size using delta compression | |
| US11194719B2 (en) | Cache optimization | |
| US10880390B2 (en) | Method and apparatus for reducing network resource transmission size using delta compression | |
| US9888089B2 (en) | Client side cache management | |
| EP2294515B1 (en) | Request routing using network computing components | |
| EP2091202A1 (en) | Data distributing method, data distributing system and correlative devices in edge network | |
| JP2012501493A (en) | Image processing method, image processing apparatus, and image processing system | |
| EP2901658B1 (en) | Request-agnostic caching for a data resource collection | |
| JP2008293281A (en) | Cache device, server, cache system, cache method, and program | |
| JP2003242018A (en) | Cache method and cache server | |
| US20150019734A1 (en) | Processing encoded content |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20090512 |
|
| A761 | Written withdrawal of application |
Free format text: JAPANESE INTERMEDIATE CODE: A761 Effective date: 20100416 |