store a calculated value in the datastore or just calculate it on the fly
Caching is most useful when the calculation is expensive. If the calculation is simple and cheap, you might as well recalculate as needed.
I writing an app in python for google app engine where each user can submit a post and each post has a ranking which is determined by its votes and comment count.  The ranking is just a simple calculation based on these two parameters.  I am wondering should I store this value in the datastore (and take up space there) or just simply calculate it every time that I need it.  Now just fyi the posts will be sorted by ranking so that needs to be taken into account.
I am mostly thinking for the sake of efficiency and trying to balance if I should try and save the datastore room or save the read/write quota.
I would think it would be better to simply store it but then I need to recalculate and rewrite the ranking value every time anyone votes or comments on the post.
Any input would be great.