<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MyOOS [Shopsystem] &#187; MyOOS Konfiguration</title>
	<atom:link href="http://www.oos-shop.de/category/myoos-tipps/myoos-konfiguration/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.oos-shop.de</link>
	<description>für eine erfolgreiche e-Commerce Strategie</description>
	<lastBuildDate>Wed, 08 Feb 2012 19:23:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Entlastung von MySQL mit Adodb</title>
		<link>http://www.oos-shop.de/entlastung-von-mysql-mit-adodb/</link>
		<comments>http://www.oos-shop.de/entlastung-von-mysql-mit-adodb/#comments</comments>
		<pubDate>Mon, 11 Aug 2008 06:33:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MyOOS Konfiguration]]></category>
		<category><![CDATA[MyOOS Performance]]></category>

		<guid isPermaLink="false">http://www.oos-shop.de/?p=53</guid>
		<description><![CDATA[Wenn der Shop eingerichtet ist kann man die eingebauten Performance-Vorteile nutzen. Eigentlich ist die Angelegenheit ganz banal. in der Datei ~/shop/includes/oos_define.php den Wert der Konstanten USE_DB_CACHE auf true ändern. define&#40;'USE_DB_CACHE', 'true'&#41;; // OOS SQL-Layer Cache Weitere Änderungen an den Sourcen vom Projekt sind nicht notwendig. Aber wer es einmal ausporbieren möchte&#8230;. ~/shop/includes/oos_blocks.php Über die Datenbankabfrage [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Wenn der Shop eingerichtet ist kann man die eingebauten Performance-Vorteile nutzen.</p>
<p>Eigentlich ist die Angelegenheit ganz banal. in der Datei<br />
~/shop/includes/oos_define.php den Wert der <a href="http://de3.php.net/manual/de/language.constants.php" target="blank">Konstanten<br />
</a> <em>USE_DB_CACHE</em> auf <em>true</em> ändern.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">  <span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'USE_DB_CACHE'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'true'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>   <span style="color: #666666; font-style: italic;">// OOS SQL-Layer Cache</span></pre></div></div>

<p>Weitere Änderungen an den Sourcen vom Projekt sind nicht notwendig. Aber wer es einmal ausporbieren möchte&#8230;.</p>
<p>~/shop/includes/oos_blocks.php</p>
<p>Über die Datenbankabfrage werden die Content Blöcke rechts und links zum Inhalt geladen.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"> <span style="color: #000088;">$block_result</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$dbconn</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">GetAll</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$block_sql</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Wenn das Ergebnis der Datenbankabfrage für 24 Stunden gültig sein soll</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"> <span style="color: #000088;">$dbconn</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">cacheSecs</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">3600</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">24</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// cache 24 hours</span></pre></div></div>

<p>für 12 Stunden verwendet man</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"> <span style="color: #000088;">$dbconn</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">cacheSecs</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">3600</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">12</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// cache 12 hours</span></pre></div></div>

<p>für 30 Minuten</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"> <span style="color: #000088;">$dbconn</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">cacheSecs</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1800</span><span style="color: #339933;">;</span></pre></div></div>

<p>Wir ersetzen nun</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"> <span style="color: #000088;">$block_result</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$dbconn</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">GetAll</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$block_sql</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>durch</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>USE_DB_CACHE <span style="color: #339933;">==</span> <span style="color: #0000ff;">'true'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #000088;">$dbconn</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">cacheSecs</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">3600</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">24</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// cache 24 hours</span>
   <span style="color: #000088;">$block_result</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$dbconn</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">CacheExecute</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$block_sql</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #000088;">$block_result</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$dbconn</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">GetAll</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$block_sql</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span></pre></div></div>

<p>Der Shop speichert nun in das $ADODB_CACHE_DIR das Ergebis für<br />
einen Tag zwischen.</p>
<p>Weitere Informationen im <a href="http://phplens.com/adodb/caching.of.recordsets.html" target="blank" class="liexternal">adodb</a> Handbuch und in unserem <a href="http://www.oos-shop.de/doc/adodb/html/" target="blank" class="liinternal">adodb  Handbuch</a></p>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.oos-shop.de/entlastung-von-mysql-mit-adodb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

