Clear theme cache

1,124 views
Skip to first unread message

Emma Richardson

unread,
Dec 21, 2022, 12:19:07 PM12/21/22
to Keycloak User
I have found some similar posts - I have added some css to my custom theme.  The custom theme is loading fine but it is not pulling the css unless I disable the caching on start up.  I would think that when I restarted and reenabled the cache, it would pull the new version but it pulls the old version.  I even did a full server reboot but still the old version is loaded.
How do I manually delete the cache to force it to pull the new css?

Tobias Häfner

unread,
Dec 22, 2022, 3:19:08 AM12/22/22
to Keycloak User
Hello,
this is a known problem of keycloak. See this article:

What I personally do is, if I change the css files, I count up a version number in the file name.
File name before change: customization-v1.css
File name afterchange: customization-v2.css

So for keycloak this is a new file and it will deliver the new file, cause of the changed file name.

Hope this helps.

Tobias

Emma Richardson

unread,
Dec 22, 2022, 10:23:04 AM12/22/22
to Keycloak User
Tobias, thank you!!  That worked and was so simple.

Emma Richardson

unread,
Dec 22, 2022, 10:29:16 AM12/22/22
to Keycloak User
For anyone else looking for this, remember to also update your theme.properties file to reference the renamed css file.

scott molinari

unread,
Feb 3, 2023, 4:06:21 AM2/3/23
to Keycloak User
Is there any way to have the cache setting turned off? I've read something about a "dev mode", but I've not found out how to turn it on. 

Scott

Stan Silvert

unread,
Feb 3, 2023, 9:15:59 AM2/3/23
to scott molinari, Pedro Igor Silva, Keycloak User
In the WildFly version of Keycloak, you could turn off the cache in standalone.xml.  I don't know off hand how to do it with the Quarkus version.

Pedro, do you know?

--
You received this message because you are subscribed to the Google Groups "Keycloak User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keycloak-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-user/b7347c43-d0c7-4dca-914c-b81d6d5e018en%40googlegroups.com.

pigor.c...@gmail.com

unread,
Feb 3, 2023, 9:21:03 AM2/3/23
to Keycloak User
Reply all
Reply to author
Forward
0 new messages