-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GEOS-8430] Cache small amount of features in memory to avoid repeate…
…d data scans in GetFeature requests - some small improvements. Small docs and code changes, added one test to check GetFeature still works when the caching machinery is disabled
- Loading branch information
Showing
3 changed files
with
120 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/wfs/src/test/java/org/geoserver/wfs/GetFeatureNoCachingTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,26 @@ | |||
/* (c) 2017 Open Source Geospatial Foundation - all rights reserved | |||
* This code is licensed under the GPL 2.0 license, available at the root | |||
* application directory. | |||
*/ | |||
package org.geoserver.wfs; | |||
|
|||
import org.geoserver.wfs.v2_0.GetFeatureTest; | |||
import org.junit.AfterClass; | |||
import org.junit.BeforeClass; | |||
|
|||
/** | |||
* Test making sure GetFeature still works when the caching machinery is off (since most test datasets | |||
* will actually be cached in memory) | |||
*/ | |||
public class GetFeatureNoCachingTest extends GetFeatureTest { | |||
|
|||
@BeforeClass | |||
public static void disableCaching() { | |||
FeatureSizeFeatureCollection.setFeatureCacheLimit(0); | |||
} | |||
|
|||
@AfterClass | |||
public static void enableCaching() { | |||
FeatureSizeFeatureCollection.setFeatureCacheLimit(FeatureSizeFeatureCollection.DEFAULT_CACHE_SIZE); | |||
} | |||
} |