ogallagher / tejos_textiles

An online arts journal for publishing works in a new medium
MIT License
1 stars 0 forks source link

Webpage caching preventing pages from updating #92

Closed ogallagher closed 8 months ago

ogallagher commented 3 years ago

The amount of webpage caching seems to have increased since I was last working on the site, as now (in Safari at least) I have to clear the browser cache every time I add new content to the site.

I've updated the db schema file to have a new updated table, so next items will be:

After implementing db query versions, update the references to source/asset files to include versions as well. The best way to do this is probably to change the file paths themselves, forcing all pages that reference them to use the updated paths. I could additionally create symlinks to represent the versioned targets for backwards compatibility.

ogallagher commented 2 years ago

One way to prevent unnecessary caching would be to maintain a last_updated table, with datetimes corresponding to each table (or rows in a table). These datetimes would then be used as a versioning system for each db api query as part of the query parameters (ex. /db?query=apple&args=[1,2,3]&version=20220510084153).

ogallagher commented 1 year ago

Just reconfirmed that adding contributions does not update the account page unless I clear the site cache in mobile Safari.

ogallagher commented 8 months ago

I think this is also preventing account edits from showing in the webpage (ex. biography text, links).

ogallagher commented 8 months ago

During testing I realized there was an error in the add_update db procedure where I was using a column name instead of the corresponding procedure argument. Currently, the source code for such db items exists only in my local environment, but if not in this GitHub repo, it should at least exist somewhere else that's easily recoverable.