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

Sehr viele Unterverzeichnisse im Cache

 
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
frolix
Smarty Rookie


Joined: 24 Sep 2004
Posts: 16
Location: Kiel

PostPosted: Fri Sep 24, 2004 10:39 am    Post subject: Sehr viele Unterverzeichnisse im Cache Reply with quote

Hi,

ich habe im Cache-Verzeichnis aktuell 31998 Unterverzeichnisse. Jetzt meckert leider das Filesystem mit der Meldung "Too many links".
Hat dazu jemand eine Idee?

Gruss
frolix
Back to top
View user's profile Send private message
McSodbrenner
Smarty Pro


Joined: 19 Sep 2004
Posts: 101
Location: Hamburg, Germany

PostPosted: Fri Sep 24, 2004 10:57 am    Post subject: Reply with quote

Wozu brauchst du denn so viele Cache-Dateien bzw. Ordner???
Hast du bei einer Suche etwa jedes Suchergebnis gecacht??? Smile
_________________
Grüzi, Smile
Christoph

My sweet home: www.webboarder.de
Do not visit!! It is private!! And it's mine!
Back to top
View user's profile Send private message Visit poster's website
frolix
Smarty Rookie


Joined: 24 Sep 2004
Posts: 16
Location: Kiel

PostPosted: Fri Sep 24, 2004 10:59 am    Post subject: Reply with quote

ne das sind alles Kategorien eines Webkataloges. Und ein kleiner Teil sind Suchergebnisse die meistens gleich sind und die per XML von einem anderen Server geholt werden. Auch da macht der Cache Sinn.
Back to top
View user's profile Send private message
kills
Smarty Elite


Joined: 28 May 2004
Posts: 493

PostPosted: Fri Sep 24, 2004 11:36 am    Post subject: Reply with quote

frolix wrote:
ne das sind alles Kategorien eines Webkataloges. Und ein kleiner Teil sind Suchergebnisse die meistens gleich sind und die per XML von einem anderen Server geholt werden. Auch da macht der Cache Sinn.


verwendest du $use_subdirs?

wenn ja, vielleicht mal deaktivieren... Ich weiss nicht obs auch ne restriction gibt wieviel Dateien in einem Ordner maximal sein dürfen.

@see http://smarty.php.net/manual/en/variable.use.sub.dirs.php

Notfalls musst du dein Caching überarbeiten...

Vielleicht reicht auch ein herabsetzen der cache_lifetime.

@see http://smarty.php.net/manual/en/variable.cache.lifetime.php
Back to top
View user's profile Send private message
frolix
Smarty Rookie


Joined: 24 Sep 2004
Posts: 16
Location: Kiel

PostPosted: Fri Sep 24, 2004 12:34 pm    Post subject: Reply with quote

also $use_subdirs hab ich nicht explizit aktiviert. Scheint default zu sein.
Aber je nach Filesystem gibt es auch eine max. Anzahl von Dateien in einem Verzeichnis. Da die Anwendung auf einem Vhost laeuft, weiss ich nicht welches Filesystem dort laeuft. Sagt mir mein Provider hoffentlich gleich. Ich hab jetzt mal an der cache_lifetime gedreht. Aber eine schoene Loesung ist das nicht.
Back to top
View user's profile Send private message
kills
Smarty Elite


Joined: 28 May 2004
Posts: 493

PostPosted: Fri Sep 24, 2004 2:21 pm    Post subject: Reply with quote

frolix wrote:
also $use_subdirs hab ich nicht explizit aktiviert. Scheint default zu sein.
Aber je nach Filesystem gibt es auch eine max. Anzahl von Dateien in einem Verzeichnis. Da die Anwendung auf einem Vhost laeuft, weiss ich nicht welches Filesystem dort laeuft. Sagt mir mein Provider hoffentlich gleich. Ich hab jetzt mal an der cache_lifetime gedreht. Aber eine schoene Loesung ist das nicht.


Welche Version von Smarty verwendest du?

Laut Doku ist use_subdirs default auf false!

Ich glaube du wirst nicht drumm rumm kommen, deine Cache Strategy zu ändern.
Back to top
View user's profile Send private message
frolix
Smarty Rookie


Joined: 24 Sep 2004
Posts: 16
Location: Kiel

PostPosted: Fri Sep 24, 2004 2:24 pm    Post subject: Reply with quote

ich hab noch die 2.5.0.
Ich befuerchte auch, dass ich was aendern muss. Schoen waere, wenn die Verzeichnisstruktur fuer den Cache anders aufgebaut waere. Z.B.

0/1
0/2
0/3
1/0
1/1/0
1/2/0
usw.
Back to top
View user's profile Send private message
messju
Administrator


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

PostPosted: Fri Sep 24, 2004 2:41 pm    Post subject: Reply with quote

vielleicht solltest du in deinem fall die cached files lieber in einer datenbank halten. eine cache_handler_func dafür ist schnell geschrieben.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
frolix
Smarty Rookie


Joined: 24 Sep 2004
Posts: 16
Location: Kiel

PostPosted: Fri Sep 24, 2004 2:46 pm    Post subject: Reply with quote

das waere natuerlich gut. Aber leider hab ich keinen Plan wie ich sowas bauen soll. Hat sowas jemand schon irgendwo gepostet. Hab vorhin mal nach ressourcehandlern gesucht aber nichts gefunden. Zumindest nicht hier im Forum.
Back to top
View user's profile Send private message
frolix
Smarty Rookie


Joined: 24 Sep 2004
Posts: 16
Location: Kiel

PostPosted: Fri Sep 24, 2004 3:08 pm    Post subject: Reply with quote

ok hab einen Link gefunden. In der Doku Embarassed
Werd ich mal antesten.
Back to top
View user's profile Send private message
frolix
Smarty Rookie


Joined: 24 Sep 2004
Posts: 16
Location: Kiel

PostPosted: Fri Sep 24, 2004 5:37 pm    Post subject: Reply with quote

funktioniert bisher klasse. Allerdings sind auch erst 3600 in der Datenbank. Mal sehn wie es mit 32000 ist
Back to top
View user's profile Send private message
kills
Smarty Elite


Joined: 28 May 2004
Posts: 493

PostPosted: Fri Sep 24, 2004 6:52 pm    Post subject: Reply with quote

messju wrote:
vielleicht solltest du in deinem fall die cached files lieber in einer datenbank halten. eine cache_handler_func dafür ist schnell geschrieben.


das ist natürlich eine sehr gute idee

frolix wrote:
funktioniert bisher klasse. Allerdings sind auch erst 3600 in der Datenbank. Mal sehn wie es mit 32000 ist


Naja, Datenbanken sollten mit solch "geringen" Datenmengen keine Probleme haben. Hier bei uns haben wir auch Tabellen mit 100000-200000 Datensätzen im Einsatz ohne Probleme
Back to top
View user's profile Send private message
frolix
Smarty Rookie


Joined: 24 Sep 2004
Posts: 16
Location: Kiel

PostPosted: Sun Sep 26, 2004 11:04 pm    Post subject: Reply with quote

ja sieht sehr gut aus. Jetzt sind schon 36.000 Templates im Cache. Und die Performance ist noch sehr gut. Trotz Shared-Hosting.
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