1

Fix updating css

Posted by admin 2 years ago
1
8

It seems the css for a sub can only be changed once, further changes don't seem to take effect.

![test](https://uploadpie.com/EvjhjN)

This is an archived submission. You won't be able to comment.
Comments (8)

Want to leave a comment?

Sort by: Best
1
Cicero

this is a production-only bug so I'll have to fix in prod. I'll let you know when it's fixed.

reply permalink report gild save
1
admin

Epic, looking forward to it.

reply permalink report gild save
1
Cicero

This is probably that weirdest production bug I've ever encountered. It seems that these files are being cached. So you ARE replacing these files, the server-side cache needs to be cleared before it works. wtf

reply permalink report gild save
1
admin

Would it make sense for the custom css to be dynamic loaded then? It's an extra api call, but should solve the issue and would allow people to block custom css too.

reply permalink report gild save
1
Cicero

Right now the custom CSS is being parsed and checked if it's valid, with some custom validation rules I added like no URLs, then saved. The problem is that ALL user-uploaded files are being cached, for hours it seems. Even things like avatars. So I need to fix this. I'm GUESSING laravel octane is causing the issue but I can't find anyone else with this issue.

reply permalink report gild save
1
admin

It seems that it is possible to programatically clear/update the cache, you could do a task that is run every 5 minutes to update the cache.

Programatically clear the cache: https://tinkerwell.app/blog/laravel-caches-and-all-ways-to-clear-them

reply permalink report gild save
1
Cicero

I'll take a look

reply permalink report gild save