Skip to content

Commit e8fbd88

Browse files
author
Daniel Cohen
committed
added invalidate to bulk deletes
1 parent fa562f4 commit e8fbd88

File tree

1 file changed

+4
-4
lines changed
  • cloudinary-core/src/main/java/com/cloudinary

1 file changed

+4
-4
lines changed

cloudinary-core/src/main/java/com/cloudinary/Api.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public ApiResponse deleteResources(Iterable<String> publicIds, Map options) thro
117117
if (options == null) options = ObjectUtils.emptyMap();
118118
String resourceType = ObjectUtils.asString(options.get("resource_type"), "image");
119119
String type = ObjectUtils.asString(options.get("type"), "upload");
120-
Map params = ObjectUtils.only(options, "keep_original", "next_cursor");
120+
Map params = ObjectUtils.only(options, "keep_original","invalidate", "next_cursor");
121121
params.put("public_ids", publicIds);
122122
return callApi(HttpMethod.DELETE, Arrays.asList("resources", resourceType, type), params, options);
123123
}
@@ -126,22 +126,22 @@ public ApiResponse deleteResourcesByPrefix(String prefix, Map options) throws Ex
126126
if (options == null) options = ObjectUtils.emptyMap();
127127
String resourceType = ObjectUtils.asString(options.get("resource_type"), "image");
128128
String type = ObjectUtils.asString(options.get("type"), "upload");
129-
Map params = ObjectUtils.only(options, "keep_original", "next_cursor");
129+
Map params = ObjectUtils.only(options, "keep_original","invalidate", "next_cursor");
130130
params.put("prefix", prefix);
131131
return callApi(HttpMethod.DELETE, Arrays.asList("resources", resourceType, type), params, options);
132132
}
133133

134134
public ApiResponse deleteResourcesByTag(String tag, Map options) throws Exception {
135135
if (options == null) options = ObjectUtils.emptyMap();
136136
String resourceType = ObjectUtils.asString(options.get("resource_type"), "image");
137-
return callApi(HttpMethod.DELETE, Arrays.asList("resources", resourceType, "tags", tag), ObjectUtils.only(options, "keep_original", "next_cursor"), options);
137+
return callApi(HttpMethod.DELETE, Arrays.asList("resources", resourceType, "tags", tag), ObjectUtils.only(options, "keep_original","invalidate", "next_cursor"), options);
138138
}
139139

140140
public ApiResponse deleteAllResources(Map options) throws Exception {
141141
if (options == null) options = ObjectUtils.emptyMap();
142142
String resourceType = ObjectUtils.asString(options.get("resource_type"), "image");
143143
String type = ObjectUtils.asString(options.get("type"), "upload");
144-
Map filtered = ObjectUtils.only(options, "keep_original", "next_cursor");
144+
Map filtered = ObjectUtils.only(options, "keep_original","invalidate", "next_cursor");
145145
filtered.put("all", true);
146146
return callApi(HttpMethod.DELETE, Arrays.asList("resources", resourceType, type), filtered, options);
147147
}

0 commit comments

Comments
 (0)