Skip to content

Commit

Permalink
Added createdAt timestamp to cache element (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew-Lees11 authored and djones6 committed Feb 5, 2019
1 parent 7e32a53 commit 4012937
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Sources/Credentials/BaseCacheElement.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,22 @@
**/

// MARK BaseCacheElement
import Foundation

/// The cache element for keeping user profile information.
public class BaseCacheElement {
/// The user profile information stored as `UserProfile`.
public var userProfile: UserProfile

/// The time the UserProfile was originally created
public var createdAt: Date

/// Initialize a `BaseCacheElement`.
///
/// - Parameter profile: the `UserProfile` to store.
public init (profile: UserProfile) {
userProfile = profile
createdAt = Date()
}
}

0 comments on commit 4012937

Please sign in to comment.