Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Caching

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German
View previous topic :: View next topic  
Author Message
kills
Smarty Elite


Joined: 28 May 2004
Posts: 493

PostPosted: Mon Jul 12, 2004 1:21 pm    Post subject: Caching Reply with quote

Hallo zusammen,

ich arbeite seit kurzem mit template caching.

Nun habe ich folgende Scripts:

Global.php
[php:1:78ebfbee8b]
<?php
/* 3rd Party Klassen einbinden */
set_include_path( get_include_path() .PATH_SEPARATOR.
dirname( realpath( "./_php/Smarty-2.6.2/Smarty.class.php"))
);

require_once( "Smarty.class.php");

/* einzelnen eigene Module einbinden */

include( "_php/Folder.php");
include( "_php/FolderContent.php");
include( "_php/FileSystemBrowser.php");
include( "_php/FileSystemBrowserProfile.php");

/* Template Objekt initialisieren */

$oTemplate = new Smarty();
$oTemplate->template_dir = 'Templates/';
$oTemplate->compile_dir = 'Templates/_compiled/';
$oTemplate->config_dir = 'Templates/_configs/';
$oTemplate->cache_dir = 'Templates/_cached/';
$oTemplate->chaching = true;
$oTemplate->debugging = true;


/* Globale Variablen/Einstellungen */
?>
[/php:1:78ebfbee8b]

Index.php
[php:1:78ebfbee8b]
<?php

include( "_php/Global.php");

$oTemplate->assign( "sPageTitel", "FileSystemBrowser");

if ( !empty( $_GET["path"] )) {
$sContentTemplate = "FileSystemBrowser.tpl";

// Unterseiten
.
.
.

} else {

// Startseite

$sContentTemplate = "Starter.tpl";
}


$oTemplate->assign( "sContentTemplate", $sContentTemplate);
$oTemplate->display( "Index.tpl", $sContentTemplate . @$_GET["path"]);
?>
[/php:1:78ebfbee8b]

Ich rufe alle meine Seiten per "Index.php" auf und übergebe anhand einer path variable welche Datei nun innerhalb des ganzen verwendet werden soll.

Wie im Manual beschrieben arbeite ich mit TemplateIds da ich mehrere Caches für eine Datei verwenden möchte.

Warum aber werden nie dateien im TPL-Cache-Dir erzeugt?
Wo speichert der mir die Multiple-Cache-Dateien hin?

Wenn ich cachen einschalte und die TPL-ID weglasse, werden dateien im TPL-Dir erstellt.

Wo liegt mein Fehler?
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Mon Jul 12, 2004 1:29 pm    Post subject: Reply with quote

ich würde sagen der fehler liegt in "$smarty->chaching=true", das müsste "caching" heissen.

in "templates_c" werden immer dateien erzeugt, egal ob caching an oder aus ist. in templates_c liegen die compilierten templates (php-code).

in "cache" werden nur dateien erzeugt wenn caching aktiviert ist. hier liegt dann quasi html-code.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kills
Smarty Elite


Joined: 28 May 2004
Posts: 493

PostPosted: Mon Jul 12, 2004 2:13 pm    Post subject: Reply with quote

messju wrote:
ich würde sagen der fehler liegt in "$smarty->chaching=true", das müsste "caching" heissen.



ach mist vertippt Smile

danke daran lags!
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP