|
Post by votan on Jul 11, 2008 6:16:39 GMT -5
Is there a way to write the html code generated by a script directly to a file?
|
|
|
Post by carlgundel on Jul 11, 2008 13:10:22 GMT -5
Is there a way to write the html code generated by a script directly to a file? Not now, but please enlighten me why you would want to do this? -Carl
|
|
|
Post by votan on Jul 11, 2008 13:43:29 GMT -5
I'm trying to find a way to realize a simple caching system....
|
|
|
Post by carlgundel on Jul 11, 2008 15:47:48 GMT -5
I'm trying to find a way to realize a simple caching system.... Unless I misunderstand you, I think you'll find that this idea works cross purpose to RB. RB is meant to be a system for pushing dynamic content to the browser, not static content. -Carl
|
|
|
Post by votan on Jul 11, 2008 16:25:11 GMT -5
..of cause.... but even in a dynamic system, many things often stay unchanged for a longer time.... and pulling such things up from a cache would be a good thing then, instead of re-running the whole script again. Maybe I should explain why I'm so interested in a cahcing system and also a template system..... I run a bunch of high traffic sites, but till now I always hired programmers to create the stuff. I allready tried to get a grip into php and perl.... but I guess I'm to lazy or dumb for really learning all the stuff needed to get things running... Also had a look at ruby and python... but no. For some reason I instantly liked RB and now wanna stick with it.... that's also why I request so many enhancements and stuff.... would like to help making RB a really powerfull web-language. So my goal is, to write my next site myslef.... all in RB. And this needs to be able to whithstand high amounts of traffic as well.... so caching is important.... same for templating. But according to the current command set, the template system will not really work... or produce high system load due to complicated parsing.
|
|
|
Post by carlgundel on Jul 14, 2008 13:33:37 GMT -5
Isn't it possible to just write your static content to the public folder and then let the RB web server serve those up directly? And it would be just as easy to generate a table of contents page and/or store the filenames in a database table using some handy key. Or you could use programmatically generated filenames a la REST.
-Carl
|
|
|
Post by votan on Jul 14, 2008 21:11:18 GMT -5
Well, besides other stuff, I'm trying to do a little but comfortable gallery program with automatic thumbnail creation, comments, rating, paging etc.... This is all dynamic... but depending on the contents of different galleries, it can be that a new pic is only added or deleted once per hour/day/week or so... so in many cases there is no real change to the content so often, what would actually make it a waste of resources to generate this gallery always dynamically. Especially when lots of traffic is coming. So the pages could be served from a cach, unless for example a new pic has been added or a comment was written. Only then is makes sense to use valuable systemresources again to newly generate the site, by doing all the sql queries and stuff. But that's why I also need to find a way to write / read SQL query-results, as this would already allow me to simply cach the queries and pull them up whenever needed.. or update them when changes were done.
|
|