I\'m going to be implementing a lightweight formatting language (probably Textile, maybe Markdown) in a project I\'m working on, and I\'m wonder how best to store it in the data
You should definetly store original Textile/Markdown markup and use either standard HTTP caching stuff (Last-modified, Expires-At, ETag) to cache rendered pages or just cache the result of processing markup.
Store markdown:
Store html
Store both
You have to weigh up your processing costs vs. your storage cost.
I'm currently using Markdown with PHP. I store the markdown-source in the database, and I display the Converted Version upon request. I have no performance issues, and am very happy with this setup.
What I've seen is indeed to store the compiled HTML in a seperate row in the database. Just have one row 'content' and another 'content_html', and save the compiled HTML in the 'content_html' row.
(Surely you have some kind of save method that you can override to do this?)