\section{KHTMLPage\-Cache Class Reference}
\label{classKHTMLPageCache}\index{KHTMLPageCache@{KHTMLPageCache}}
Singleton Object that handles a binary cache on top of the http cache management of kio.  


{\tt \#include $<$khtml\_\-pagecache.h$>$}

Inheritance diagram for KHTMLPage\-Cache:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=69pt]{classKHTMLPageCache__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KHTMLPage\-Cache:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=89pt]{classKHTMLPageCache__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
long {\bf create\-Cache\-Entry} ()
\item 
void {\bf add\-Data} (long id, const {\bf QByte\-Array} \&data)
\item 
void {\bf end\-Data} (long id)
\item 
void {\bf cancel\-Entry} (long id)
\item 
bool {\bf is\-Valid} (long id)
\item 
bool {\bf is\-Complete} (long id)
\item 
void {\bf fetch\-Data} (long id, {\bf QObject} $\ast$recv\-Obj, const char $\ast$recv\-Slot)
\item 
void {\bf cancel\-Fetch} ({\bf QObject} $\ast$recv\-Obj)
\item 
void {\bf save\-Data} (long id, {\bf QData\-Stream} $\ast$str)
\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static {\bf KHTMLPage\-Cache} $\ast$ {\bf self} ()
\end{CompactItemize}


\subsection{Detailed Description}
Singleton Object that handles a binary cache on top of the http cache management of kio. 

A limited number of HTML pages are stored in this cache. This cache is used for the history and operations like \char`\"{}view source\char`\"{}. These operations always want to use the original document and don't want to fetch the data from the network again.

It operates completely independent from the kio\_\-http cache. 



Definition at line 41 of file khtml\_\-pagecache.h.

\subsection{Member Function Documentation}
\index{KHTMLPageCache@{KHTMLPage\-Cache}!self@{self}}
\index{self@{self}!KHTMLPageCache@{KHTMLPage\-Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KHTMLPage\-Cache} $\ast$ KHTMLPage\-Cache::self ()\hspace{0.3cm}{\tt  [static]}}\label{classKHTMLPageCache_e0}


static \char`\"{}constructor\char`\"{}. 

\begin{Desc}
\item[Returns:]returns a pointer to the cache, if it exists. creates a new cache otherwise. \end{Desc}


Definition at line 121 of file khtml\_\-pagecache.cpp.

References KStatic\-Deleter$<$ type $>$::set\-Object().

Referenced by KHTMLPart::close\-URL(), and KHTMLPart::document\-Source().\index{KHTMLPageCache@{KHTMLPage\-Cache}!createCacheEntry@{createCacheEntry}}
\index{createCacheEntry@{createCacheEntry}!KHTMLPageCache@{KHTMLPage\-Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}long KHTMLPage\-Cache::create\-Cache\-Entry ()}\label{classKHTMLPageCache_a1}


Create a new cache entry. 

\begin{Desc}
\item[Returns:]a cache entry ID is returned. \end{Desc}


Definition at line 143 of file khtml\_\-pagecache.cpp.\index{KHTMLPageCache@{KHTMLPage\-Cache}!addData@{addData}}
\index{addData@{addData}!KHTMLPageCache@{KHTMLPage\-Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPage\-Cache::add\-Data (long {\em id}, const {\bf QByte\-Array} \& {\em data})}\label{classKHTMLPageCache_a2}


Add {\tt data} to the cache entry with id {\tt id}. 



Definition at line 158 of file khtml\_\-pagecache.cpp.\index{KHTMLPageCache@{KHTMLPage\-Cache}!endData@{endData}}
\index{endData@{endData}!KHTMLPageCache@{KHTMLPage\-Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPage\-Cache::end\-Data (long {\em id})}\label{classKHTMLPageCache_a3}


Signal end of data for the cache entry with id {\tt id}. 

After calling this the entry is marked complete 

Definition at line 166 of file khtml\_\-pagecache.cpp.\index{KHTMLPageCache@{KHTMLPage\-Cache}!cancelEntry@{cancelEntry}}
\index{cancelEntry@{cancelEntry}!KHTMLPageCache@{KHTMLPage\-Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPage\-Cache::cancel\-Entry (long {\em id})}\label{classKHTMLPageCache_a4}


Cancel the entry. 



Definition at line 174 of file khtml\_\-pagecache.cpp.

Referenced by KHTMLPart::close\-URL().\index{KHTMLPageCache@{KHTMLPage\-Cache}!isValid@{isValid}}
\index{isValid@{isValid}!KHTMLPageCache@{KHTMLPage\-Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KHTMLPage\-Cache::is\-Valid (long {\em id})}\label{classKHTMLPageCache_a5}


\begin{Desc}
\item[Returns:]true when the cache entry with id {\tt is} still valid, and at least some of the data is available for reading (the complete data may not yet be loaded) \end{Desc}


Definition at line 185 of file khtml\_\-pagecache.cpp.\index{KHTMLPageCache@{KHTMLPage\-Cache}!isComplete@{isComplete}}
\index{isComplete@{isComplete}!KHTMLPageCache@{KHTMLPage\-Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KHTMLPage\-Cache::is\-Complete (long {\em id})}\label{classKHTMLPageCache_a6}


\begin{Desc}
\item[Returns:]true when the cache entry with id {\tt is} still valid, and the complete data is available for reading \end{Desc}


Definition at line 191 of file khtml\_\-pagecache.cpp.

Referenced by KHTMLPart::document\-Source().\index{KHTMLPageCache@{KHTMLPage\-Cache}!fetchData@{fetchData}}
\index{fetchData@{fetchData}!KHTMLPageCache@{KHTMLPage\-Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPage\-Cache::fetch\-Data (long {\em id}, {\bf QObject} $\ast$ {\em recv\-Obj}, const char $\ast$ {\em recv\-Slot})}\label{classKHTMLPageCache_a7}


Fetch data for cache entry {\tt id} and send it to slot {\tt recv\-Slot} in the object {\tt recv\-Obj}. 



Definition at line 200 of file khtml\_\-pagecache.cpp.

References QTimer::single\-Shot().\index{KHTMLPageCache@{KHTMLPage\-Cache}!cancelFetch@{cancelFetch}}
\index{cancelFetch@{cancelFetch}!KHTMLPageCache@{KHTMLPage\-Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPage\-Cache::cancel\-Fetch ({\bf QObject} $\ast$ {\em recv\-Obj})}\label{classKHTMLPageCache_a8}


Cancel sending data to {\tt recv\-Obj}. 



Definition at line 218 of file khtml\_\-pagecache.cpp.

Referenced by KHTMLPart::close\-URL().\index{KHTMLPageCache@{KHTMLPage\-Cache}!saveData@{saveData}}
\index{saveData@{saveData}!KHTMLPageCache@{KHTMLPage\-Cache}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPage\-Cache::save\-Data (long {\em id}, {\bf QData\-Stream} $\ast$ {\em str})}\label{classKHTMLPageCache_a9}


Save the data of cache entry {\tt id} to the datastream {\tt str}. 



Definition at line 272 of file khtml\_\-pagecache.cpp.

Referenced by KHTMLPart::document\-Source().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
khtml\_\-pagecache.h\item 
khtml\_\-pagecache.cpp\end{CompactItemize}
