=Code.CacheSet("SessionId", "Key", Fields!FieldName.Value)
User!UserID+Globals!ExecutionTime
Parameters!UserID.Value+Globals!ExecutionTime
Key
FieldName
=Code.CacheSet("SessionId", "Key", Format(Fields!FieldName.Value, "MM/dd/yyyy"))
=Code.CacheGet("SessionId", "Key")
Dim x As String = CacheGet("Key")
Private Shared _dict As System.Collections.Generic.Dictionary(Of String, String) '-------------------------------------------------------------------------------------------------- Public Shared Function CacheSet(ByVal sessionId As String, ByVal name As String, ByVal value As _ String) As Boolean Dim result As Boolean = False Try name = sessionId.ToUpper() & "|" & name.ToUpper() If value IsNot Nothing Then CreateDictionary() If _dict.ContainsKey(name) Then _dict.Item(name) = value result = True Else _dict.Add(name, value) result = True End If End If Catch ex As Exception ' ignore exceptions End Try Return result End Function '-------------------------------------------------------------------------------------------------- Public Shared Function CacheGet(ByVal sessionId As String, ByVal name As String) As String Dim result As String = "" Try name = sessionId.ToUpper() & "|" & name.ToUpper() CreateDictionary() If _dict.ContainsKey(name) Then result = _dict.Item(name) End If Catch ex As Exception ' ignore exceptions End Try Return result End Function '-------------------------------------------------------------------------------------------------- Private Shared Sub CreateDictionary() If _dict Is Nothing Then _dict = New System.Collections.Generic.Dictionary(Of String, String) End If End Sub