Expand my Community achievements bar.

SOLVED

Influenced pages from content by a js file change

Avatar

Level 3

Hi All,

    One js file in /etc/design../clientlib or  in apps/someapp/component/somecomponent  was changed.

    How to know which pages from /content directory are influenced?  

Thanks in advance,

Yura.

1 Accepted Solution

Avatar

Correct answer by
Level 8

The system doesn't necessarily provide a way to query that. The relationship between a page and client lib is dependent on what the template of the page includes and what the components included on the page. Are you trying to understand what pages to flush from dispatcher cache? Typically best practice would be to flush all pages from cache. 

View solution in original post

4 Replies

Avatar

Level 9

You might have to use querydebug or crx query to get the contents you are looking for. Please review the following post from stackoverflow.

http://stackoverflow.com/questions/21268976/optimizing-sling-queries

Avatar

Correct answer by
Level 8

The system doesn't necessarily provide a way to query that. The relationship between a page and client lib is dependent on what the template of the page includes and what the components included on the page. Are you trying to understand what pages to flush from dispatcher cache? Typically best practice would be to flush all pages from cache. 

Avatar

Level 3

orotas wrote...

The system doesn't necessarily provide a way to query that. The relationship between a page and client lib is dependent on what the template of the page includes and what the components included on the page. Are you trying to understand what pages to flush from dispatcher cache? Typically best practice would be to flush all pages from cache. 

 

Are you trying to understand what pages to flush from dispatcher cache?

Not exactly, Offline mode for a page in case there is no connection. I have an idea to use Application Cache (HTML5) http://www.html5rocks.com/en/tutorials/appcache/beginner/

The approach contains 2 phases :

  1. Generate a static MANIFEST file which includes all resources to cache , could be an activation workflow step
  2. Invalidate (regenerate)  that static  MANIFEST file in case any related js or css was changed

The #1 is easily resolvable, and I'm trying to understand what could be a solution for #2

Thanks,

Yura

Avatar

Employee Advisor

Hi,

Assuming, that changed JS files occur only on deployments, I would invalidate the complete content (just in case). Otherwise you need to find all client-libs, which include this JS file, and the identify all components requiring these clientlibs, and after that you need to invalidate all pages, which contain these components. That's a massive amount of work.

Jörg