SOI Request cached from Server

1960
2
Jump to solution
07-03-2017 05:17 AM
SebastianBosbach
New Contributor III

Hi everyone,

I'm currently developing a SOI to restrict access to layers of a service based on the logged in user.

My problem is that the first request the Javascript api sends, the one which gets the description of the service like SRID, Layers etc., is cached by the server. So if I change the permissions of a user, he still gets the old cached service description.

The export Image request on the other hand don't get cached.

I already removed the browser cache, disabled caching on my IIS (arcgis webadaptor) and I also tried adding a random timestamp to the ServiceUrl to prevent caching the description request. But the response is always the same and my debugger of the SOI also doesn't get triggered.

Is there a propertie or something to tell arcgis not to cache any request of the service.

If I restart the service, my debugger gets trigger on the description request, but only once. 

What can I do to prevent this caching?

best regards

Sebastian

0 Kudos
1 Solution

Accepted Solutions
nicogis
MVP Frequent Contributor

Implementing layer-level access control

If you implement layer level-access control through an SOI, you'll also need to configure ArcGIS Server's REST handler to disable caching of all layer resources included the service. This will allow you to intercept operations and filter out layers which are not allowed. You can disable this by setting the service's disableCaching property to true in the ArcGIS Server Administrator Directory.

  1. Open the ArcGIS Server Administrator Directory and sign in. The URL is typically formatted http://gisserver.domain.com:6080/arcgis/admin.
  2. Click services and click the name of the desired service. If you don't see it in the list, it may be located within a folder in this directory.
  3. Click edit.
  4. In the properties section of the service JSON, add the disableCaching property and set its value to true, for example:
    "properties": {   ...   "disableCaching": "true",   ...  },
  5. Click Save Edits.

View solution in original post

0 Kudos
2 Replies
nicogis
MVP Frequent Contributor

Implementing layer-level access control

If you implement layer level-access control through an SOI, you'll also need to configure ArcGIS Server's REST handler to disable caching of all layer resources included the service. This will allow you to intercept operations and filter out layers which are not allowed. You can disable this by setting the service's disableCaching property to true in the ArcGIS Server Administrator Directory.

  1. Open the ArcGIS Server Administrator Directory and sign in. The URL is typically formatted http://gisserver.domain.com:6080/arcgis/admin.
  2. Click services and click the name of the desired service. If you don't see it in the list, it may be located within a folder in this directory.
  3. Click edit.
  4. In the properties section of the service JSON, add the disableCaching property and set its value to true, for example:
    "properties": {   ...   "disableCaching": "true",   ...  },
  5. Click Save Edits.
0 Kudos
Amir-Sarrafzadeh-Arasi
Occasional Contributor

Dear Nicogis,

Can you please tell me where exactly the properties section of the service JSON?

 

Thank you in advance

Amir Sarrafzadeh Arasi
0 Kudos