掲示板

Is CDN enabled Liferay site aware of when a user is in CMS state?

8年前 に Traolly Xiong によって更新されました。

Is CDN enabled Liferay site aware of when a user is in CMS state?

Regular Member 投稿: 195 参加年月日: 11/12/30 最新の投稿
Hello Community,
An interesting topic came up today. If a Liferay site is CDN enabled and it caches a lot of the static resources on the regional CDN servers and locally, how does Liferay know when to NOT cache static resources when in a CMS state? So for example if I was uploading images under docs and media with the same name and file path, I would think the image get's replaced on the back-end but the old image in the browser would still display due to cache.
NOTE: There is no staging site and the site only has 1 virtual host name it uses.

Couple of questions.
1) Is there a Liferay setting that helps cater to that use case?
2) Are there tips / tricks to get static resources to not cache and be dynamic when the user is in a CMS state doing content work?

Thanks.

Traolly Xiong
thumbnail
8年前 に David H Nebinger によって更新されました。

RE: Is CDN enabled Liferay site aware of when a user is in CMS state?

Liferay Legend 投稿: 14918 参加年月日: 06/09/02 最新の投稿
If I upload an image, I get a new version. The old version is still available.

On the page the URL will change, often the t= parameter will be different at least.

So Liferay doesn't really care much about the CDN or the nature of the caching values, it adjusts the URLs so caches won't fail.
8年前 に Traolly Xiong によって更新されました。

RE: Is CDN enabled Liferay site aware of when a user is in CMS state?

Regular Member 投稿: 195 参加年月日: 11/12/30 最新の投稿
Hello David,
Well as far as templates go, when using the API to get the URL, it disregards the "t" value so the image URL will be the same each time.
But for this use case where the user is in the CMS and changing static files, is safe to say all the static files will contain a "t" value for the browser to
use to check it's freshness of the file(s)?

Thanks.
thumbnail
8年前 に David H Nebinger によって更新されました。

RE: Is CDN enabled Liferay site aware of when a user is in CMS state?

Liferay Legend 投稿: 14918 参加年月日: 06/09/02 最新の投稿
Liferay will still attempt to get the latest version of an asset if no version is specified so it should still return the correct asset even when no version (or timestamp) is specified. The t parameter is used to get around caching mechanisms, since it's a different t value the cache appliance should pass the request through to Liferay for processing.

Now, what happens if you monkey around in the CDN? Honestly I'm not sure. You'll probably have to test this out to see what exactly will happen.
8年前 に Traolly Xiong によって更新されました。

RE: Is CDN enabled Liferay site aware of when a user is in CMS state?

Regular Member 投稿: 195 参加年月日: 11/12/30 最新の投稿
Cool. I'll have to test it out more thoroughly.

Thanks.
8年前 に Traolly Xiong によって更新されました。

RE: Is CDN enabled Liferay site aware of when a user is in CMS state?

Regular Member 投稿: 195 参加年月日: 11/12/30 最新の投稿
Hello David,
This is kind of off topic, but I wanted to see if you had any ideas about the issue I am seeing in this forum post?

https://www.liferay.com/community/forums/-/message_boards/message/47904052

Thanks.