[ Web Proxy ]
URL:
Viewing: http://developer.android.com/reference/android/net/SSLSessionCache [Back]  [Original]

SSLSessionCache  |  API reference  |  Android Developers Skip to main content
Essentials Design & Plan Develop Google Play Blog
Search:
Android Studio
Android Developers [Android Developers]
Stay organized with collections Save and categorize content based on your preferences.
Added in API level 8

SSLSessionCache


public final class SSLSessionCache
extends Object

java.lang.Object
   ↳ android.net.SSLSessionCache


File-based cache of established SSL sessions. When re-establishing a connection to the same server, using an SSL session cache can save some time, power, and bandwidth by skipping directly to an encrypted stream. This is a persistent cache which can span executions of the application.

See also:

Summary

Public constructors

SSLSessionCache(Context context)

Create a session cache at the default location for this app.

SSLSessionCache(File dir)

Create a session cache using the specified directory.

Inherited methods

Public constructors

SSLSessionCache

Added in API level 8
public SSLSessionCache (Context context)

Create a session cache at the default location for this app. Multiple instances share data internally.

Parameters
context Context: for the application

SSLSessionCache

Added in API level 8
public SSLSessionCache (File dir)

Create a session cache using the specified directory. Individual session entries will be files within the directory. Multiple instances for the same directory share data internally.

Parameters
dir File: to store session files in (created if necessary)

Throws
IOException if the cache can't be opened

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2026-08-03 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-03 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page