My new site (to read books) actually uses static content to serve the pages: I have the HTML file saved in a folder and, to serve the page, I read it and pass the content to a jinja2 template, to show all together. No database hits except for get the book ID to know the title.
This is working fine and fast, but it is obvious that I must "upload" every new book with the "Deploy" option from GAE SDK (from what I've read, there is no way to access the file system in GAE from outside, like with an FTP), which is not the optimally way.
So I'm thinking on save the HTML contents to the database but: will this increase the database hits a lot? I'm using NDB, so in theory, every user that reads a book will get the cached result from the NDB cache, once it was readed the first time. Is this right?
Will be better to pass the html to the database? In terms of size, it will be over 8k per html page. The pages also have image files, so, to avoid the initial problem of upload it every new book, again I must save the images also in the database, right?
An example page for a book will be like this